1
0
Fork 0
forked from judah/xx

mem: Fixed bug in Clear

This commit is contained in:
jesse 2026-02-11 02:51:20 +00:00
parent 04a5d3969d
commit 7025307028

View file

@ -75,7 +75,7 @@ func Clear(dst unsafe.Pointer, value byte, count uintptr) unsafe.Pointer {
b := (*byte)(dst) b := (*byte)(dst)
for range count { // @todo: loop unroll/maybe use asm? for range count { // @todo: loop unroll/maybe use asm?
*b = value *b = value
b = (*byte)(unsafe.Add(dst, 1)) b = (*byte)(unsafe.Add(b, 1))
} }
return dst return dst
} }