mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
Fix double addition in init map update
This commit is contained in:
+1
-1
@@ -731,7 +731,7 @@ func (c *Compiler) parseInitFunc(frame *Frame) error {
|
|||||||
hashmap := allocs[instr.Map]
|
hashmap := allocs[instr.Map]
|
||||||
count := llvm.ConstExtractValue(hashmap, []uint32{2}).ZExtValue()
|
count := llvm.ConstExtractValue(hashmap, []uint32{2}).ZExtValue()
|
||||||
count++
|
count++
|
||||||
countValue := llvm.ConstInt(c.lenType, count + 1, false)
|
countValue := llvm.ConstInt(c.lenType, count, false)
|
||||||
hashmap = llvm.ConstInsertValue(hashmap, countValue, []uint32{2})
|
hashmap = llvm.ConstInsertValue(hashmap, countValue, []uint32{2})
|
||||||
allocs[instr.Map] = hashmap
|
allocs[instr.Map] = hashmap
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user