summaryrefslogtreecommitdiff
path: root/src/go-flex.skl
diff options
context:
space:
mode:
Diffstat (limited to 'src/go-flex.skl')
-rw-r--r--src/go-flex.skl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/go-flex.skl b/src/go-flex.skl
index 9597a91..e231942 100644
--- a/src/go-flex.skl
+++ b/src/go-flex.skl
@@ -621,7 +621,11 @@ static void yy_init_buffer(yybuffer b, FILE * file, FlexLexer *yyscanner)
yy_flush_buffer(b, yyscanner);
b->yyInputFile = file;
- b->yyFillBuffer = true;
+ if (b->yyInputFile == NULL) {
+ b->yyFillBuffer = false;
+ } else {
+ b->yyFillBuffer = true;
+ }
/* If b is the current buffer, then yy_init_buffer was _probably_
* called from yyrestart() or through yy_get_next_buffer.