authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-09-15 23:17:56+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-09-23 13:51:18+01:00
logfc3ff262374c704a01a5f8a8b0cd721e3b61a9c8
treebd7ce74f539fdb6d757c887cd2a87d1acfe5f323
parent0710314de6b6ab30d43a9426e58379d4827b532e

TypedValue: print undef @ptrFromInt pointers correctly


1 files changed, 6 insertions(+), 3 deletions(-)

src/TypedValue.zig+6-3
......@@ -257,9 +257,12 @@ pub fn print(
257257 },
258258 .ptr => |ptr| {
259259 if (ptr.addr == .int) {
260 const i = ip.indexToKey(ptr.addr.int).int;
261 switch (i.storage) {
262 inline else => |addr| return writer.print("{x:0>8}", .{addr}),
260 switch (ip.indexToKey(ptr.addr.int)) {
261 .int => |i| switch (i.storage) {
262 inline else => |addr| return writer.print("{x:0>8}", .{addr}),
263 },
264 .undef => return writer.writeAll("undefined"),
265 else => unreachable,
263266 }
264267 }
265268