fixes yet another indexing bug caused by the strict strings

This commit is contained in:
Araq
2018-05-21 14:22:02 +02:00
parent 5472574f72
commit dc809bd485

View File

@@ -189,7 +189,7 @@ proc putComment(g: var TSrcGen, s: string) =
put(g, tkComment, com)
com = "## "
inc(i)
if s[i] == '\x0A': inc(i)
if i < s.len and s[i] == '\x0A': inc(i)
optNL(g, ind)
of '\x0A':
put(g, tkComment, com)