From 893b229312dace0fde2085f0ecd21a02811356b6 Mon Sep 17 00:00:00 2001 From: Patrick MARIE Date: Tue, 27 Aug 2024 18:45:16 +0200 Subject: [PATCH] fix: jump offsets --- src/utils.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.zig b/src/utils.zig index 0c08f57..d900cd3 100644 --- a/src/utils.zig +++ b/src/utils.zig @@ -40,7 +40,7 @@ pub fn jump_instruction(opcode_name: []const u8, sign: i32, chunk: Chunk, offset const address: i32 = @as(i32, @intCast(offset)) + 3 + sign * jump; - debug.print("{s:16} {d:4} -> {}", .{ opcode_name, offset, address }); + debug.print("{s:16} {d:4} -> {x}\n", .{ opcode_name, offset, address }); return offset + 3; }