Skip to content

Commit

Permalink
Fix: Properly check number of varaction2 ranges (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
glx22 authored Jan 4, 2025
1 parent a84ad36 commit 028cef0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nml/actions/action2var.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,9 @@ def parse_varaction2(switch_block):
)
)

if len(varaction2.ranges) > 255:
raise generic.ScriptError("Too many ranges.", varaction2.pos)

# Handle default result
if switch_block.body.default is not None:
# there is a default value
Expand Down

0 comments on commit 028cef0

Please sign in to comment.