diff --git a/pandatool/src/xfile/xLexer.lxx b/pandatool/src/xfile/xLexer.lxx index d71be462ba..b3c963fcaa 100644 --- a/pandatool/src/xfile/xLexer.lxx +++ b/pandatool/src/xfile/xLexer.lxx @@ -604,3 +604,8 @@ SEPARATOR [ \t;,]+ } +. { + // Any other character is invalid. + accept(); + xyyerror("Invalid character '" + string(xyytext) + "'."); +}