From fb535b4c75e041bf7dd71e5567c49989dd7c24ab Mon Sep 17 00:00:00 2001 From: johanknol Date: Wed, 19 Dec 2001 15:11:33 +0000 Subject: [PATCH] fixed bug #482699 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1717 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCC.lex | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/SDCC.lex b/src/SDCC.lex index ab68168e..b67cda3d 100644 --- a/src/SDCC.lex +++ b/src/SDCC.lex @@ -573,10 +573,13 @@ int yyerror(char *s) { fflush(stdout); - if (yylineno && filename) - fprintf(stdout,"\n%s:%d: %s: token -> '%s' ; column %d\n", - filename,yylineno, - s,yytext,column); - fatalError++; + if (yylineno && filename) { + fprintf(stdout,"\n%s:%d: %s: token -> '%s' ; column %d\n", + filename,yylineno, + s,yytext,column); + fatalError++; + } else { + // this comes from an empy file, no problem + } return 0; } -- 2.30.2