Skip to content

Commit b8e079b

Browse files
committed
fix: incbasic first-line issues
1 parent 10fa659 commit b8e079b

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

7800bas.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ int main (int argc, char *argv[])
358358

359359
// preprocessing removed in favor of a simplistic lex-based preprocessor
360360

361+
// fprintf(stderr,"%s",code); // DEBUG
362+
361363
i = 0;
362364
j = 0;
363365
k = 0;

keywords.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ void keywords (char **cstatement)
4343
char **deallocelstatement;
4444
int door;
4545
int foundelse = 0;
46+
47+
if ((cstatement[0]!=NULL)&&(cstatement[0][0] == ';'))
48+
return;
4649

4750
//#define DEBUGTRC 1
4851
#ifdef DEBUGTRC
@@ -604,6 +607,8 @@ void keywords (char **cstatement)
604607
return;
605608

606609
removeCR (statement[1]);
610+
if (statement[1][0]==0)
611+
return;
607612
sprintf (errorcode, "unknown keyword '%s'.", statement[1]);
608613
prerror (&errorcode[0]);
609614
exit (1);

0 commit comments

Comments
 (0)