diff --git a/src/lexer.h b/src/lexer.h index 189d0b43698cec96fff87ef39f8a92b67583ec26..4a588369c13cdb48fbb841ea920a7841996cc2b0 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -860,7 +860,7 @@ unknown_directive: default: res <<= 8; res |= tmp; - if( ++l > 8 ) + if( ++l > 4 ) { yyerror("Too large character constant."); /* skip the rest of the characters. */ diff --git a/src/testsuite.in b/src/testsuite.in index 81963da5391b1390adb09cc0908eabfc24c58769..0d389d35f68ce39e36c17314bd4905211c2f5702 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -132,7 +132,7 @@ test_compile_error("\d109827346981234561823743412654") test_compile_error("\x109a27bc69e256c83deaa34c26b4") test_compile_error('\u17fo') test_compile_error("\u17fo") -test_eq('\uu117f', 0x5c7531313766) +test_compile_error('\uu117f', 0x5c7531313766) test_eq("\uuuu17fo", "\\uuu17fo") test_eq('\u117f', 0x117f) test_eq("\u117foo", "\10577oo")