diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index 386bd847..96d1bb84 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -43,7 +43,7 @@ func memcpy(dst, src unsafe.Pointer, size uintptr) { // Set the given number of bytes to zero. func memzero(ptr unsafe.Pointer, size uintptr) { for i := uintptr(0); i < size; i++ { - *(*byte)(unsafe.Pointer(uintptr(ptr) + size)) = 0 + *(*byte)(unsafe.Pointer(uintptr(ptr) + i)) = 0 } }