fixes yet another indexing bug caused by the strict strings

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

View file

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