aboutsummaryrefslogtreecommitdiff
path: root/lib/std/leb128.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2024-08-26 15:38:35 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2024-08-27 03:55:56 -0400
commitf289b82d0efda77b72ccf9c826023e904f9ffcab (patch)
treeeb0bbade490e385b46942628016d34dd32515c86 /lib/std/leb128.zig
parent26d4fd5276eaaa939cf21a516265101c551b62f2 (diff)
downloadzig-f289b82d0efda77b72ccf9c826023e904f9ffcab.tar.gz
zig-f289b82d0efda77b72ccf9c826023e904f9ffcab.zip
Dwarf: implement .eh_frame
Diffstat (limited to 'lib/std/leb128.zig')
-rw-r--r--lib/std/leb128.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/leb128.zig b/lib/std/leb128.zig
index 1915782459..d9e0556231 100644
--- a/lib/std/leb128.zig
+++ b/lib/std/leb128.zig
@@ -125,7 +125,7 @@ pub const readILEB128 = readIleb128;
pub fn writeIleb128(writer: anytype, arg: anytype) !void {
const Arg = @TypeOf(arg);
const Int = switch (Arg) {
- comptime_int => std.math.IntFittingRange(-arg - 1, arg),
+ comptime_int => std.math.IntFittingRange(-@abs(arg), @abs(arg)),
else => Arg,
};
const Signed = if (@typeInfo(Int).Int.bits < 8) i8 else Int;