aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-07-04 06:03:31 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-07-04 06:03:31 -0700
commitfd09b305380bebfdc2b47c8d58e29f790bb64d1a (patch)
tree93adb04c0cbe886d91d4115445b4d072a011a32a
parenteea02d950009fce77cf45a3aaa0d594be7c83bb7 (diff)
downloadbun-fd09b305380bebfdc2b47c8d58e29f790bb64d1a.tar.gz
bun-fd09b305380bebfdc2b47c8d58e29f790bb64d1a.tar.zst
bun-fd09b305380bebfdc2b47c8d58e29f790bb64d1a.zip
[sourcemaps] Add an assertion
-rw-r--r--src/sourcemap/sourcemap.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sourcemap/sourcemap.zig b/src/sourcemap/sourcemap.zig
index 22a916940..92bd6189c 100644
--- a/src/sourcemap/sourcemap.zig
+++ b/src/sourcemap/sourcemap.zig
@@ -645,7 +645,11 @@ pub const LineOffsetTable = struct {
}
if (c > 0x7F and columns_for_non_ascii.items.len == 0) {
-
+ std.debug.assert(@ptrToInt(
+ remaining.ptr,
+ ) > @ptrToInt(
+ contents.ptr,
+ ));
// we have a non-ASCII character, so we need to keep track of the
// mapping from byte offsets to UTF-16 code unit counts
columns_for_non_ascii.appendAssumeCapacity(column);