From a2eb1df42d79104878d14dfc957a97e5ef5831eb Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 10 Jul 2019 18:42:16 +0200 Subject: regression #7105 correct counting for group close counting In case of an extra closing we should not count this closing as otherwise sequences like: ``` @} ... @{ ... @} ``` will give a warning at both `@}` statements and not just at the first (second one has an opening statement_. --- src/commentscan.l | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commentscan.l b/src/commentscan.l index 665360c..519cc09 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -3361,6 +3361,7 @@ void closeGroup(Entry *e,const char *fileName,int line,bool foundInline) g_openCount--; if (g_openCount < 0) { + g_openCount++; // undo an extra non existing specified level warn(fileName,line,"unbalanced grouping commands"); } //printf("==> closeGroup(name=%s,sec=%x,file=%s,line=%d) g_autoGroupStack=%d\n", -- cgit v0.12