From fe819011e29562d80fc07f45ed7900cc0c55acda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gunnlaugur=20=C3=9E=C3=B3r=20Briem?= Date: Tue, 24 Sep 2013 18:14:53 +0000 Subject: [PATCH] Just offset by the initial quote character ... dividing by two yields bogus offsets for multi-character adjustments, leading to invalid sourcemaps with negative column positions --- lib/output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/output.js b/lib/output.js index 73b55865..70964125 100644 --- a/lib/output.js +++ b/lib/output.js @@ -315,7 +315,7 @@ function OutputStream(options) { // Fixes offsets for quoted keys of object literals remainder = token.endpos - token.pos - tokenName.length; - offset = remainder === 0 ? 0 : remainder/2; + offset = remainder === 0 ? 0 : 1; } options.source_map.add(