Skip to content

Fix off-by-one error with sourcemaps#24982

Merged
rbuckton merged 2 commits into
masterfrom
sourceMapBase
Jun 15, 2018
Merged

Fix off-by-one error with sourcemaps#24982
rbuckton merged 2 commits into
masterfrom
sourceMapBase

Conversation

@rbuckton
Copy link
Copy Markdown
Contributor

We had a discrepancy in our source map encoding and decoding logic, where we encoded source maps using 1-based line/column offsets, but decoded source maps using 0-based line/column offsets. This off-by-one error became apparent when we switched away from index maps into a merged source map for project reference builds. This PR switches all source map encoding and decoding to 0-based line/column offsets to align both and simplify the math involved.

@rbuckton rbuckton merged commit b979413 into master Jun 15, 2018
@rbuckton rbuckton deleted the sourceMapBase branch June 15, 2018 08:07
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants