Change-Id: Ib28ce114c708c94c478ef04d17471b392e5c0960
This commit is contained in:
Mateusz Poliwczak 2023-12-22 15:19:47 +01:00
parent 62cb36f7d9
commit 38d219b81f
1 changed files with 2 additions and 2 deletions

View File

@ -366,6 +366,6 @@ func bytealg_MakeNoZero(len int) []byte {
if uintptr(len) > maxAlloc {
panicmakeslicelen()
}
l := roundupsize(uintptr(len), true)
return unsafe.Slice((*byte)(mallocgc(uintptr(l), nil, false)), l)[:len]
cap := roundupsize(uintptr(len), true)
return unsafe.Slice((*byte)(mallocgc(uintptr(cap), nil, false)), cap)[:len]
}