More concise way of slicing off the last character

This commit is contained in:
Aparajita Fishman
2013-10-12 03:15:08 -04:00
committed by Marijn Haverbeke
parent 6e6c7b0af4
commit 9ff4981ca2

View File

@@ -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) {