From: Wolfgang Bumiller Date: Sat, 22 Dec 2012 21:44:14 +0000 (+0100) Subject: Better error message for -futf8 X-Git-Tag: before-library~542 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=2164afb8cf8de2d23da61d53019db0dda21d2e00;p=xonotic%2Fgmqcc.git Better error message for -futf8 --- diff --git a/lexer.c b/lexer.c index ee8fd4a..55557da 100644 --- a/lexer.c +++ b/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