fix #3692 memory alignment bug in core:mem.dynamic_pool_alloc_bytes

This commit is contained in:
DerTee
2024-07-03 22:11:26 +02:00
parent a76f9a70d5
commit 6b373cf49e
+1 -3
View File
@@ -748,9 +748,7 @@ dynamic_pool_alloc_bytes :: proc(p: ^Dynamic_Pool, bytes: int) -> ([]byte, Alloc
return
}
n := bytes
extra := p.alignment - (n % p.alignment)
n += extra
n := align_formula(bytes, p.alignment)
if n > p.block_size {
return nil, .Invalid_Argument
}