diff --git a/acorn.js b/acorn.js index f966917221..436a156ff7 100644 --- a/acorn.js +++ b/acorn.js @@ -834,7 +834,7 @@ ch = input.charCodeAt(++tokPos); var octal = /^[0-7]+/.exec(input.slice(tokPos, tokPos + 3)); if (octal) octal = octal[0]; - while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, octal.length - 1); + while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1); if (octal === "0") octal = null; ++tokPos; if (octal) {