Fix ch that could contain other newline characters

This commit is contained in:
Anthony Van de Gejuchte
2015-12-27 22:24:37 +01:00
parent 174404c0f3
commit 6f3e35bb3f

View File

@@ -399,7 +399,7 @@ function tokenizer($TEXT, filename, html5_comments, shebang) {
if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8));
else ch = read_escaped_char(true);
}
else if (ch == "\n") parse_error("Unterminated string constant");
else if ("\r\n\u2028\u2029".indexOf(ch) >= 0) parse_error("Unterminated string constant");
else if (ch == quote) break;
ret += ch;
}