summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-05-21 14:22:02 +0200
committerAraq <rumpf_a@web.de>2018-05-21 14:22:02 +0200
commitdc809bd485ae9a104666a4ee4a3728eab9e2b39f (patch)
tree83135a25d30f99eb0f2f80c107ffebbbc611e049
parent5472574f721ae08cb696f4129abcff54e1e88d83 (diff)
downloadNim-dc809bd485ae9a104666a4ee4a3728eab9e2b39f.tar.gz
fixes yet another indexing bug caused by the strict strings
-rw-r--r--compiler/renderer.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index 966bed769..75c19a163 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -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)