summary refs log tree commit diff stats
path: root/compiler/ccgliterals.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-11-16 00:13:39 +0100
committerAraq <rumpf_a@web.de>2018-11-16 00:13:49 +0100
commit4bd9f32f335b43d1cdcfbbd99cbe91bb478a400c (patch)
treea629a0df2999c02a574b3c4e82ca988e6204f2b2 /compiler/ccgliterals.nim
parent2eb14bdd41933d3b1b624e48d7513172be1a1e7a (diff)
downloadNim-4bd9f32f335b43d1cdcfbbd99cbe91bb478a400c.tar.gz
--gc:destructors: hello world example compiles and runs
Diffstat (limited to 'compiler/ccgliterals.nim')
-rw-r--r--compiler/ccgliterals.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgliterals.nim b/compiler/ccgliterals.nim
index 34677ec06..ccfa49a1d 100644
--- a/compiler/ccgliterals.nim
+++ b/compiler/ccgliterals.nim
@@ -69,7 +69,7 @@ proc genStringLiteralV2(m: BModule; n: PNode): Rope =
     addf(m.s[cfsData], "static const NimStringV2 $1 = {$2, (NimStrPayload*)&$3};$n",
           [result, rope(len(n.strVal)), pureLit])
   else:
-    result = m.tmpBase & rope(id)
+    result = m.tmpBase & rope(id+1)
 
 proc genStringLiteralV2Const(m: BModule; n: PNode): Rope =
   let id = nodeTableTestOrSet(m.dataCache, n, m.labels)