mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
4848c3a1ad
Currently the only function that handles sentinel terminated slices properly is free. All uses of mem.sliceAsBytes() in the allocator interface lack proper handling of a possible sentinel. This commit changes the Allocator interface to use @ptrCast() plus the new mem.absorbSentinel() instead. Reported-by: David Vanderson <david.vanderson@gmail.com> References: https://github.com/ziglang/zig/pull/19984 References: https://github.com/ziglang/zig/pull/23020