gbranden pushed a commit to branch master
in repository groff.

commit be26537b694e3b1a36be15cd38863064c853c44b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon May 4 18:05:43 2026 -0500

    src/roff/troff/node.cpp: Fix Savannah #68303.
    
    * src/roff/troff/node.cpp (left_italic_corrected_node::asciify): Revise
      assert(3)ion: it's okay for this type of container node's contents
      (`nodes`) to be empty if we're in nroff mode.
    
    Fixes <https://savannah.gnu.org/bugs/?68303>.  Problem introduced by me
    in commit d445aee94e, 10 September, as part of the redesign of the
    "asciify" feature.  Thanks to Deri James for catching the problem and
    root-cause analyzing it.
---
 ChangeLog               | 11 +++++++++++
 src/roff/troff/node.cpp |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 333ace89e..d14df5409 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-05-04  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/node.cpp (left_italic_corrected_node::asciify):
+       Revise assert(3)ion: it's okay for this type of container node's
+       contents (`nodes`) to be empty if we're in nroff mode.
+
+       Fixes <https://savannah.gnu.org/bugs/?68303>.  Problem
+       introduced by me in commit d445aee94e, 10 September, as part of
+       the redesign of the "asciify" feature.  Thanks to Deri James for
+       catching the problem and root-cause analyzing it.
+
 2026-05-04  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (process_input_stack): Add null
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index ca124d072..75cd63766 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4039,7 +4039,8 @@ void italic_corrected_node::asciify(macro *m)
 
 void left_italic_corrected_node::asciify(macro *m)
 {
-  assert(nodes != 0 /* nullptr */);
+  // In nroff mode, this node type _can_ be an empty container.
+  assert(in_nroff_mode || (nodes != 0 /* nullptr */));
   if (!is_output_suppressed && (nodes != 0 /* nullptr */))
     nodes->asciify(m);
   nodes = 0 /* nullptr */;

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to