From 4ef271d4c64a872bedb2c40fcefc1128d8d5b412 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 24 Aug 2018 02:48:59 +0200 Subject: [PATCH] Fix double addition in init map update --- compiler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler.go b/compiler.go index a29bb900..d63a4b76 100644 --- a/compiler.go +++ b/compiler.go @@ -731,7 +731,7 @@ func (c *Compiler) parseInitFunc(frame *Frame) error { hashmap := allocs[instr.Map] count := llvm.ConstExtractValue(hashmap, []uint32{2}).ZExtValue() count++ - countValue := llvm.ConstInt(c.lenType, count + 1, false) + countValue := llvm.ConstInt(c.lenType, count, false) hashmap = llvm.ConstInsertValue(hashmap, countValue, []uint32{2}) allocs[instr.Map] = hashmap