From: Mihai Bazon Date: Wed, 8 May 2013 19:37:48 +0000 (+0300) Subject: Fix property names X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=11e24d53a195685578abe76b6ef34cb80f3a5730;p=UglifyJS.git Fix property names Close #199 --- diff --git a/lib/parse.js b/lib/parse.js index b3687201..c45c064e 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -168,7 +168,9 @@ function is_identifier_char(ch) { }; function is_identifier_string(str){ - for (var i = str.length; --i >= 0;) { + var i = str.length; + if (i == 0) return false; + while (--i >= 0) { if (!is_identifier_char(str.charAt(i))) return false; }