diff options
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r-- | src/string_immutable.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig index d393577fc..321abb9f7 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -3192,7 +3192,7 @@ pub fn indexOfCharZ(sliceZ: [:0]const u8, char: u8) ?u63 { const pos = @ptrToInt(ptr) - @ptrToInt(sliceZ.ptr); if (comptime Environment.allow_assert) - std.debug.assert(@ptrToInt(sliceZ.ptr) >= @ptrToInt(ptr) and + std.debug.assert(@ptrToInt(sliceZ.ptr) <= @ptrToInt(ptr) and @ptrToInt(ptr) < @ptrToInt(sliceZ.ptr + sliceZ.len) and pos <= sliceZ.len); |