Skip to content

Commit

Permalink
Fix empty-choice-indent bug
Browse files Browse the repository at this point in the history
Reported by a user on discord, having an empty choice before an indentation change would incorreclty calculate the amount of end branches needed.
  • Loading branch information
Jowan-Spooner committed Jan 5, 2024
1 parent 4e81b82 commit ff288d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/dialogic/Resources/timeline.gd
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func process() -> void:
_events.append(end_event.duplicate())
# Add an end event if the indent is the same but the previous was an opener
# (so for example choice that is empty)
elif prev_was_opener and len(indent) == len(prev_indent):
if prev_was_opener and len(indent) <= len(prev_indent):
_events.append(end_event.duplicate())
prev_indent = indent

Expand Down

0 comments on commit ff288d2

Please sign in to comment.