1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-28 03:29:39 +00:00

Fixed #ifdef and #ifndef.

This commit is contained in:
acqn 2022-07-24 19:07:02 +08:00
parent 16a8a64746
commit be26b0631b

View File

@ -1136,16 +1136,20 @@ static int DoIf (int Skip)
static int DoIfDef (int skip, int flag) static int DoIfDef (int skip, int flag)
/* Process #ifdef if flag == 1, or #ifndef if flag == 0. */ /* Process #ifdef if flag == 1, or #ifndef if flag == 0. */
{ {
int Value = 0;
if (!skip) {
ident Ident; ident Ident;
SkipWhitespace (0); SkipWhitespace (0);
if (MacName (Ident) == 0) { if (MacName (Ident)) {
return 0; Value = IsMacro (Ident);
} else {
return PushIf (skip, flag, IsMacro(Ident));
} }
} }
return PushIf (skip, flag, Value);
}
static void DoInclude (void) static void DoInclude (void)