X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=token.c;h=c78d97ac6f0054d8ca02bf68b0a3a1c0c10406e4;hp=cc754ab88e65e2f683977a09b44a24f8ba624e38;hb=d9c1d993917d9f0101747e137709fe2ba9854b7f;hpb=f4e9bcd703852c51c97d2586872b9b26389899e6 diff --git a/token.c b/token.c index cc754ab..c78d97a 100644 --- a/token.c +++ b/token.c @@ -728,7 +728,10 @@ int fpop(void) // Pop IFENT levels until we reach the conditional assembly context we // were at when the input object was entered. while (ifent != inobj->in_ifent) - d_endif(); + { + if (d_endif() != 0) // Something bad happened during endif parsing? + return -1; // If yes, bail instead of getting stuck in a loop + } tok = inobj->in_otok; // Restore tok and otok etok = inobj->in_etok; @@ -940,8 +943,10 @@ if (verb_flag) printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); case SRC_IMACRO: if ((ln = GetNextMacroLine()) == NULL) { - ExitMacro(); // Exit macro (pop args, do fpop(), etc) - goto retry; // Try for more lines... + if (ExitMacro() == 0) // Exit macro (pop args, do fpop(), etc) + goto retry; // Try for more lines... + else + return TKEOF; // Oops, we got a non zero return code, signal EOF } lntag = '@';