Skip to content

Commit

Permalink
Merge pull request #33 from timotheecour/pr_fix_npeg_D20210519T113112
Browse files Browse the repository at this point in the history
  • Loading branch information
zevv authored May 26, 2021
2 parents e7bd87d + 7076aac commit 5d80f93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/npeg/stack.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ proc initStack*[T](name: string, len: int, max: int=int.high): Stack[T] =

proc grow*[T](s: var Stack[T]) =
if s.top >= s.max:
mixin NPegException
raise newException(NPegException, s.name & " stack overflow, depth>" & $s.max)
s.frames.setLen s.frames.len * 2

Expand Down

0 comments on commit 5d80f93

Please sign in to comment.