]> granicus.if.org Git - flex/commitdiff
resolve #1990170
authorWill Estes <wlestes@users.sourceforge.net>
Fri, 17 Feb 2012 21:21:44 +0000 (21:21 +0000)
committerWill Estes <wlestes@users.sourceforge.net>
Fri, 17 Feb 2012 21:21:44 +0000 (21:21 +0000)
flex.skl

index 80fa8b18faf072b2bd3e53f332d1c818452b053e..60c141ff944da622dfe5ea269b59be4188181b45 100644 (file)
--- a/flex.skl
+++ b/flex.skl
@@ -1078,7 +1078,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
 /* This used to be an fputs(), but since the string might contain NUL's,
  * we now use fwrite().
  */
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
 %endif
 %if-c++-only C++ definition
 #define ECHO LexerOutput( yytext, yyleng )