Fix double addition in init map update

This commit is contained in:
Ayke van Laethem
2018-08-24 02:48:59 +02:00
parent 179cf74b01
commit 4ef271d4c6
+1 -1
View File
@@ -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