emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ff4de9eff30: * lib-src/etags.c (C_entries): Fix assertion violati


From: Eli Zaretskii
Subject: master ff4de9eff30: * lib-src/etags.c (C_entries): Fix assertion violation.
Date: Mon, 7 Oct 2024 14:07:16 -0400 (EDT)

branch: master
commit ff4de9eff30ade164655354f71e7cbca48135858
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    * lib-src/etags.c (C_entries): Fix assertion violation.
---
 lib-src/etags.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]