diff --git a/lex.ll b/lex.ll index f589b904ed..4a83b744e2 100644 --- a/lex.ll +++ b/lex.ll @@ -396,12 +396,12 @@ lEscapeChar(char *str, char *pChar, SourcePos *pos) // octal constants \012 case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': - *pChar = strtol(str, &tail, 8); + *pChar = (char)strtol(str, &tail, 8); str = tail - 1; break; // hexidecimal constant \xff case 'x': - *pChar = strtol(str, &tail, 16); + *pChar = (char)strtol(str, &tail, 16); str = tail - 1; break; default: