Fixing 177314:
TokenStream.java: third octal digit is a part of the octal escape in strings only if the result is <= 0377. resources/Messages.properties: removal of unused msg.oct.esc.too.large
This commit is contained in:
Родитель
5feb3db192
Коммит
2b7d0e47c2
|
@ -1016,23 +1016,20 @@ public class TokenStream {
|
|||
}
|
||||
} break;
|
||||
|
||||
default: if (isDigit(c) && c < '8') {
|
||||
default: if ('0' <= c && c < '8') {
|
||||
val = c - '0';
|
||||
c = in.read();
|
||||
if (isDigit(c) && c < '8') {
|
||||
if ('0' <= c && c < '8') {
|
||||
val = 8 * val + c - '0';
|
||||
c = in.read();
|
||||
if (isDigit(c) && c < '8') {
|
||||
if ('0' <= c && c < '8' && val <= 037) {
|
||||
// c is 3rd char of octal sequence only if
|
||||
// the resulting val <= 0377
|
||||
val = 8 * val + c - '0';
|
||||
c = in.read();
|
||||
}
|
||||
}
|
||||
in.unread();
|
||||
if (val > 0377) {
|
||||
reportSyntaxError("msg.oct.esc.too.large",
|
||||
null);
|
||||
return ERROR;
|
||||
}
|
||||
c = val;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -435,9 +435,6 @@ msg.caught.nfe =\
|
|||
msg.unterminated.string.lit =\
|
||||
unterminated string literal
|
||||
|
||||
msg.oct.esc.too.large =\
|
||||
octal escape too large
|
||||
|
||||
msg.unterminated.comment =\
|
||||
unterminated comment
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче