diff options
author | 2023-09-14 23:25:01 -0700 | |
---|---|---|
committer | 2023-09-14 23:25:01 -0700 | |
commit | da7db2230f1710d5bcb479df26c3742fac6baa0e (patch) | |
tree | 96f54d60c8ce4799f1c9043bdded265ad73ea54d /src/sourcemap/sourcemap.zig | |
parent | 94e9f8bdca5f88b5405c5a212051815659ab8b75 (diff) | |
download | bun-da7db2230f1710d5bcb479df26c3742fac6baa0e.tar.gz bun-da7db2230f1710d5bcb479df26c3742fac6baa0e.tar.zst bun-da7db2230f1710d5bcb479df26c3742fac6baa0e.zip |
fix(nitro) fix sourcemaps and JSSink closing (#5422)
* fix JSSink progress on sourcemap checking
* fix sourcemaps
* update JSSink fix
* undo + tests
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Diffstat (limited to 'src/sourcemap/sourcemap.zig')
-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 411e8523d..a274c0d94 100644 --- a/src/sourcemap/sourcemap.zig +++ b/src/sourcemap/sourcemap.zig @@ -940,7 +940,7 @@ pub const LineOffsetTable = struct { contents.ptr, )) - line_byte_offset), ); - byte_offset_to_first_non_ascii = line_byte_offset; + byte_offset_to_first_non_ascii = column_byte_offset; } // Update the per-byte column offsets @@ -1405,7 +1405,7 @@ pub const Chunk = struct { // Use the line to compute the column var original_column = loc.start - @as(i32, @intCast(line.byte_offset_to_start_of_line)); if (line.columns_for_non_ascii.len > 0 and original_column >= @as(i32, @intCast(line.byte_offset_to_first_non_ascii))) { - original_column = line.columns_for_non_ascii.ptr[@as(u32, @intCast(original_column)) - line.byte_offset_to_first_non_ascii]; + original_column = line.columns_for_non_ascii.slice()[@as(u32, @intCast(original_column)) - line.byte_offset_to_first_non_ascii]; } b.updateGeneratedLineAndColumn(output); |