Index: src/scanner-base.cc |
diff --git a/src/scanner-base.cc b/src/scanner-base.cc |
index 7af88cbbfff576ba1d3beafddb7786abbcdd73c4..e15ef416c9c4a8201bfc134db0a73f7928e565b4 100644 |
--- a/src/scanner-base.cc |
+++ b/src/scanner-base.cc |
@@ -564,6 +564,7 @@ Token::Value JavaScriptScanner::ScanNumber(bool seen_period) { |
} else { |
// if the first character is '0' we must check for octals and hex |
if (c0_ == '0') { |
+ int start_pos = source_pos(); // For reporting octal positions. |
AddLiteralCharAdvance(); |
// either 0, 0exxx, 0Exxx, 0.xxx, an octal number, or a hex number |
@@ -588,7 +589,7 @@ Token::Value JavaScriptScanner::ScanNumber(bool seen_period) { |
} |
if (c0_ < '0' || '7' < c0_) { |
// Octal literal finished. |
- octal_pos_ = next_.location; |
+ octal_pos_ = Location(start_pos, source_pos()); |
break; |
} |
AddLiteralCharAdvance(); |