nimpretty: fix out of bounds error [ci skip]
This commit is contained in:
parent
a59f0adc50
commit
4450fca6fd
1 changed files with 3 additions and 2 deletions
|
|
@ -250,8 +250,9 @@ proc wrTab(em: var Emitter) =
|
||||||
wr(em, " ", ltTab)
|
wr(em, " ", ltTab)
|
||||||
|
|
||||||
proc beginSection*(em: var Emitter) =
|
proc beginSection*(em: var Emitter) =
|
||||||
em.tokens.insert "", em.tokens.len-2
|
let pos = max(0, em.tokens.len-2)
|
||||||
em.kinds.insert ltBeginSection, em.kinds.len-2
|
em.tokens.insert "", pos
|
||||||
|
em.kinds.insert ltBeginSection, pos
|
||||||
|
|
||||||
#wr(em, "", ltBeginSection)
|
#wr(em, "", ltBeginSection)
|
||||||
proc endSection*(em: var Emitter) =
|
proc endSection*(em: var Emitter) =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue