aboutsummaryrefslogtreecommitdiff
path: root/lib/std/pdb.zig
diff options
context:
space:
mode:
authorIsaac Freund <mail@isaacfreund.com>2023-01-22 17:34:38 +0100
committerIsaac Freund <mail@isaacfreund.com>2023-01-23 12:19:53 +0100
commitfaf2fd18d33de246c5bb03905f25290108e1dd30 (patch)
tree76549a3a52ed3d3dac3fd8f62d92a1e90e95c721 /lib/std/pdb.zig
parentc0284e242f7d78955204dc8a627fecd45aa5e521 (diff)
downloadzig-faf2fd18d33de246c5bb03905f25290108e1dd30.tar.gz
zig-faf2fd18d33de246c5bb03905f25290108e1dd30.zip
std: eliminate pointless meta.assumeSentinel() usage
This fixes a bug in std.net caused during the introduction of meta.assumeSentinel due to the unfortunate semantics of mem.span() This leaves only 3 remaining uses of meta.assumeSentinel() in the standard library, each of which could be a simple @ptrCast([*:0]T, foo) instead. I think this function should likely be removed.
Diffstat (limited to 'lib/std/pdb.zig')
-rw-r--r--lib/std/pdb.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/pdb.zig b/lib/std/pdb.zig
index ab712e2aff..287b65b59d 100644
--- a/lib/std/pdb.zig
+++ b/lib/std/pdb.zig
@@ -671,7 +671,7 @@ pub const Pdb = struct {
const name_index = try reader.readIntLittle(u32);
if (name_offset > name_bytes.len)
return error.InvalidDebugInfo;
- const name = mem.sliceTo(std.meta.assumeSentinel(name_bytes.ptr + name_offset, 0), 0);
+ const name = mem.sliceTo(name_bytes[name_offset..], 0);
if (mem.eql(u8, name, "/names")) {
break :str_tab_index name_index;
}