We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a999ec3 commit 9c663a5Copy full SHA for 9c663a5
lib/source-map-consumer.js
@@ -309,7 +309,9 @@ class BasicSourceMapConsumer extends SourceMapConsumer {
309
_parseMappings(aStr, aSourceRoot) {
310
const size = aStr.length;
311
312
- const mappingsBufPtr = this._wasm.exports.allocate_mappings(size);
+ // Interpret signed result of allocate_mappings as unsigned, otherwise
313
+ // addresses higher than 2GB will be negative.
314
+ const mappingsBufPtr = this._wasm.exports.allocate_mappings(size) >>> 0;
315
const mappingsBuf = new Uint8Array(this._wasm.exports.memory.buffer, mappingsBufPtr, size);
316
for (let i = 0; i < size; i++) {
317
mappingsBuf[i] = aStr.charCodeAt(i);
0 commit comments