From: ceriel Date: Wed, 1 Mar 1989 13:39:50 +0000 (+0000) Subject: avoid spurious error messages about missing #endif X-Git-Tag: release-5-5~2542 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=847c27663b36d0e9cea1b6b29d5ad01db282f55c;p=ack.git avoid spurious error messages about missing #endif --- diff --git a/util/cpp/domacro.c b/util/cpp/domacro.c index d9db2b2dc..c7e203442 100644 --- a/util/cpp/domacro.c +++ b/util/cpp/domacro.c @@ -365,8 +365,9 @@ do_endif() { PushBack(); skipline(); - if (nestlevel-- <= svnestlevel[nestcount]) + if (nestlevel <= svnestlevel[nestcount]) error("#endif without corresponding #if"); + else nestlevel--; } PRIVATE