summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-12-04 18:33:22 +0200
committerStefan Kost <ensonic@users.sf.net>2009-12-04 23:01:32 +0200
commitdf7e6b4c031b865c56fcf44644f1bf9c700885d8 (patch)
treedbf9ef8afd69ac45422d755e1d477f97aa697914
parentbf393f0c01fb40a4ae737f88eeddce5bce896069 (diff)
downloadgobject-introspection-df7e6b4c031b865c56fcf44644f1bf9c700885d8.tar.gz
scanner: don't warn about unexpected characters when the char is \0
-rw-r--r--giscanner/scannerlexer.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 3d9aa333..d78de905 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -190,7 +190,7 @@ stringtext ([^\\\"])|(\\.)
"\""{stringtext}*"\"" { return STRING; }
"L\""{stringtext}*"\"" { return STRING; }
-. { fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); }
+. { if (yytext[0]) fprintf(stderr, "%s:%d: unexpected character `%c'\n", scanner->current_filename, lineno, yytext[0]); }
%%