Skip to content

Commit

Permalink
fixes compile crashes with one parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Jan 16, 2025
1 parent 8d0e853 commit cc7f876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/pragmas.nim
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ proc processCompile(c: PContext, n: PNode) =
var customArgs = ""
if n.kind in nkCallKinds:
s = getStrLit(c, n, 1)
if n.len <= 3:
if n.len == 3:
customArgs = getStrLit(c, n, 2)
else:
localError(c.config, n.info, "'.compile' pragma takes up 2 arguments")
Expand Down

0 comments on commit cc7f876

Please sign in to comment.