| ... | @@ -128,7 +128,7 @@ fn strtoumax(noalias str: [*:0]const c_char, noalias str_end: ?*[*:0]const c_cha | ... | @@ -128,7 +128,7 @@ fn strtoumax(noalias str: [*:0]const c_char, noalias str_end: ?*[*:0]const c_cha |
| 128 | fn stringToInteger(comptime T: type, noalias buf: [*:0]const u8, noalias maybe_end: ?*[*:0]const u8, base: c_int) T { | 128 | fn stringToInteger(comptime T: type, noalias buf: [*:0]const u8, noalias maybe_end: ?*[*:0]const u8, base: c_int) T { |
| 129 | comptime assert(std.math.isPowerOfTwo(@bitSizeOf(T))); | 129 | comptime assert(std.math.isPowerOfTwo(@bitSizeOf(T))); |
| 130 | | 130 | |
| 131 | if (base == 1 or base > 36) { | 131 | if (base < 0 or base == 1 or base > 36) { |
| 132 | if (maybe_end) |end| { | 132 | if (maybe_end) |end| { |
| 133 | end.* = buf; | 133 | end.* = buf; |
| 134 | } | 134 | } |