summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2024-10-07 21:06:34 +0300
committerEli Zaretskii <eliz@gnu.org>2024-10-07 21:06:34 +0300
commitff4de9eff30ade164655354f71e7cbca48135858 (patch)
tree788249f457fbdce7f5603410cabb2458e0d2a028 /lib-src
parent49325e13560daa768e6f455ade8c9284b7369a26 (diff)
* lib-src/etags.c (C_entries): Fix assertion violation.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 7f652790261..4c9b954c9a3 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -4266,7 +4266,10 @@ C_entries (int c_ext, /* extension of C */
/* Only if typdef == tinbody is typdefbracelev significant. */
if (typdef == tinbody && bracelev <= typdefbracelev)
{
- assert (bracelev == typdefbracelev);
+ /* If we forcibly reset bracelevel to zero above, let's
+ not shoot ourself in the foot and assert that we didn't. */
+ if (!(!ignoreindent && lp == newlb.buffer + 1))
+ assert (bracelev == typdefbracelev);
typdef = tend;
}
break;