From 8e69ab8a31809f1e7e6fe8de67faa36b63219270 Mon Sep 17 00:00:00 2001 From: GasInfinity Date: Mon, 12 Jan 2026 17:55:03 +0100 Subject: [PATCH] fix(libzigc): negative bases are also invalid --- lib/c/stdlib.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/c/stdlib.zig b/lib/c/stdlib.zig index 78757f38b90d0815c4d4f8ceb07d706649477bb9..67b6345b13fd3217670031586ce009b40e6950a6 100644 --- a/lib/c/stdlib.zig +++ b/lib/c/stdlib.zig @@ -128,7 +128,7 @@ fn strtoumax(noalias str: [*:0]const c_char, noalias str_end: ?*[*:0]const c_cha fn stringToInteger(comptime T: type, noalias buf: [*:0]const u8, noalias maybe_end: ?*[*:0]const u8, base: c_int) T { comptime assert(std.math.isPowerOfTwo(@bitSizeOf(T))); - if (base == 1 or base > 36) { + if (base < 0 or base == 1 or base > 36) { if (maybe_end) |end| { end.* = buf; } -- 2.54.0