Skip to content

Commit

Permalink
Fix potential crash
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumlamm committed Apr 16, 2024
1 parent 914775b commit a8fafd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/world.gd
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func check_room_cleared():
room.room_cleared()

func get_next_spell() -> Spell:
if next_spell_idx == -1:
if next_spell_idx == -1 or next_spell_idx >= spell_order.size():
return Spell.PLACEHOLDER
var spell = spell_order[next_spell_idx]
next_spell_idx += 1
Expand Down

0 comments on commit a8fafd5

Please sign in to comment.