]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Better error message for -futf8
authorWolfgang Bumiller <blub@speed.at>
Sat, 22 Dec 2012 21:44:14 +0000 (22:44 +0100)
committerWolfgang Bumiller <blub@speed.at>
Sun, 23 Dec 2012 09:23:42 +0000 (10:23 +0100)
lexer.c

diff --git a/lexer.c b/lexer.c
index ee8fd4a4f82552d9520fd4d44085ac1b8d218043..55557daddad9115bdd1186c1574199a5a75886f2 100644 (file)
--- 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