diff options
author | 2022-03-31 05:08:21 -0700 | |
---|---|---|
committer | 2022-03-31 05:08:21 -0700 | |
commit | fe973a5ab0d112ea6d80c8bcf7f693da879bb90d (patch) | |
tree | ee8e716fde51834b8a023f91b22677099bb7508f | |
parent | 4f1320854762ffa29c2b48755706000070ad1fb5 (diff) | |
download | bun-fe973a5ab0d112ea6d80c8bcf7f693da879bb90d.tar.gz bun-fe973a5ab0d112ea6d80c8bcf7f693da879bb90d.tar.zst bun-fe973a5ab0d112ea6d80c8bcf7f693da879bb90d.zip |
Fix more infinite loops
-rw-r--r-- | src/sourcemap/sourcemap.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sourcemap/sourcemap.zig b/src/sourcemap/sourcemap.zig index a46d45b60..90a786f5d 100644 --- a/src/sourcemap/sourcemap.zig +++ b/src/sourcemap/sourcemap.zig @@ -633,7 +633,7 @@ pub const LineOffsetTable = struct { var remaining = contents; while (remaining.len > 0) { - const len_ = strings.wtf8ByteSequenceLength(remaining[0]); + const len_ = strings.wtf8ByteSequenceLengthWithInvalid(remaining[0]); const c = strings.decodeWTF8RuneT(remaining.ptr[0..4], len_, i32, 0); const cp_len = @as(usize, len_); @@ -1003,7 +1003,7 @@ pub const Chunk = struct { const n = @intCast(usize, slice.len); var c: i32 = 0; while (i < n) { - const len = strings.wtf8ByteSequenceLength(slice[i]); + const len = strings.wtf8ByteSequenceLengthWithInvalid(slice[i]); c = strings.decodeWTF8RuneT(slice[i..].ptr[0..4], len, i32, strings.unicode_replacement); i += @as(usize, len); |