Fixed issue: Invalid escape sequences in string literals not raising errors (e.g. \q)
This commit is contained in:
@@ -552,9 +552,12 @@ public class LexState extends Constants {
|
||||
continue;
|
||||
}
|
||||
default: {
|
||||
if (!isdigit(current))
|
||||
save_and_next(); /* handles \\, \", \', and \? */
|
||||
else { /* \xxx */
|
||||
if (!isdigit(current)) {
|
||||
if (current == '\\' || current == '"' || current == '\'')
|
||||
save_and_next();
|
||||
else
|
||||
lexerror("invalid escape sequence", TK_STRING);
|
||||
} else { /* \xxx */
|
||||
int i = 0;
|
||||
c = 0;
|
||||
do {
|
||||
@@ -2150,4 +2153,4 @@ public class LexState extends Constants {
|
||||
|
||||
/* }====================================================================== */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user