Skip to content

Commit c1cb9a3

Browse files
committed
__pragma: Fix "error 001: expected token: "-string-", but found "!"" message on empty parameter string
The compiler should print an "unknown #pragma" warning instead.
1 parent 4984a48 commit c1cb9a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/compiler/sc1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8191,7 +8191,7 @@ static void dopragma(void)
81918191
assert(litidx>bck_litidx);
81928192

81938193
/* the user shouldn't prepend "!" to the option string */
8194-
if (litq[val]<=UNPACKEDMAX) {
8194+
if (litq[val]<=UNPACKEDMAX && litq[val]!=0) {
81958195
error(1,sc_tokens[tSTRING-tFIRST],"!");
81968196
goto next;
81978197
} /* if */

0 commit comments

Comments
 (0)