Update of bug #68788 (group groff):

                  Status:               Confirmed => In Progress
         Planned Release:                    None => 1.25.0
                 Summary: [troff] attempting to draw a horizontal glyph rule
with `\l` with leader character as glyph fails assertion => [PATCH] [troff]
attempting to draw glyph rules with `\l` or `\L` with non-character as glyph
fails assertion

    _______________________________________________________

Follow-up Comment #1:


diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 6e56f360e..5b1f5fcb0 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -6273,7 +6273,7 @@ static bool read_delimited_measurement(units *n,
unsigned char si)
 // \l, \L
 //
 // Here's some syntax unique to these escape sequences: a horizontal
-// measurement followed immediately by a character.
+// or vertical measurement followed immediately by a character.
 static bool read_line_rule_expression(units *n, unsigned char si,
                                      charinfo **cip)
 {
@@ -6298,6 +6298,11 @@ static bool read_line_rule_expression(units *n,
unsigned char si,
       tok.next();
     if (!(start_token == tok
          && input_stack::get_level() == start_level)) {
+      if (!tok.is_any_character()) {
+       error("cannot use %1 to draw a line of glyphs",
+             tok.description());
+       return false;
+      }
       *cip = tok.get_charinfo(true /* is_mandatory */);
       if (0 /* nullptr */ == *cip)
        assert(0 == "attempted to use token without charinfo in"




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68788>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to