1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-24 00:29:32 +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,14 +1136,18 @@ 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. */
{ {
ident Ident; int Value = 0;
SkipWhitespace (0); if (!skip) {
if (MacName (Ident) == 0) { ident Ident;
return 0;
} else { SkipWhitespace (0);
return PushIf (skip, flag, IsMacro(Ident)); if (MacName (Ident)) {
Value = IsMacro (Ident);
}
} }
return PushIf (skip, flag, Value);
} }