From dc809bd485ae9a104666a4ee4a3728eab9e2b39f Mon Sep 17 00:00:00 2001 From: Araq Date: Mon, 21 May 2018 14:22:02 +0200 Subject: [PATCH] fixes yet another indexing bug caused by the strict strings --- compiler/renderer.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/renderer.nim b/compiler/renderer.nim index 966bed7697..75c19a1638 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)