1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-15 17:30:06 +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)
/* Process #ifdef if flag == 1, or #ifndef if flag == 0. */
{
ident Ident;
int Value = 0;
SkipWhitespace (0);
if (MacName (Ident) == 0) {
return 0;
} else {
return PushIf (skip, flag, IsMacro(Ident));
if (!skip) {
ident Ident;
SkipWhitespace (0);
if (MacName (Ident)) {
Value = IsMacro (Ident);
}
}
return PushIf (skip, flag, Value);
}