Skip to content

Commit 0e2ec33

Browse files
committed
Fix bug when starting without a filename argument
1 parent 1b9886a commit 0e2ec33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

third_party/lbforth/lbforth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static FCB startupFile;
9393
static uint8_t fileBuffer[128];
9494
static char* cmdptr = cpm_cmdline;
9595
static bool fileFlag = false;
96-
static bool fileDoneFlag = false;
96+
static bool fileDoneFlag = true;
9797
char* filebuffer_pos;
9898

9999
/* A basic setup for defining builtins. This Forth uses impossibly low
@@ -1109,6 +1109,7 @@ int main()
11091109
tell("Error opening file\r\n");
11101110
return 1;
11111111
}
1112+
fileDoneFlag = false;
11121113
fillFileBuffer();
11131114
}
11141115

0 commit comments

Comments
 (0)