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