mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
Better error message for -futf8
This commit is contained in:
parent
ac0ca3de81
commit
2164afb8cf
1 changed files with 4 additions and 1 deletions
5
lexer.c
5
lexer.c
|
@ -1430,7 +1430,10 @@ int lex_do(lex_file *lex)
|
|||
Uchar u8char;
|
||||
/* check for a valid utf8 character */
|
||||
if (!OPTS_FLAG(UTF8) || !u8_analyze(lex->tok.value, NULL, NULL, &u8char, 8)) {
|
||||
if (lexwarn(lex, WARN_MULTIBYTE_CHARACTER, "multibyte character: `%s`", lex->tok.value))
|
||||
if (lexwarn(lex, WARN_MULTIBYTE_CHARACTER,
|
||||
( OPTS_FLAG(UTF8) ? "invalid multibyte character sequence `%s`"
|
||||
: "multibyte character: `%s`" ),
|
||||
lex->tok.value))
|
||||
return (lex->tok.ttype = TOKEN_ERROR);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue