We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6266f4 commit 1d698baCopy full SHA for 1d698ba
alloc.go
@@ -68,7 +68,7 @@ func (al *allocator) LNumber2I(v LNumber) LValue {
68
69
// alloc a new float, and store our value into it
70
al.fptrs = append(al.fptrs, float64(v))
71
- fptr := (*float64)(unsafe.Pointer(al.fheader.Data + uintptr(len(al.fptrs)-1)*unsafe.Sizeof(_fv)))
+ fptr := &al.fptrs[len(al.fptrs)-1]
72
73
// hack our scratch LValue to point to our allocated value
74
// this scratch lvalue is copied when this function returns meaning the scratch value can be reused
0 commit comments