[bug #68420] [troff] assertion failures on impossible {normal, no-break} control character assignments

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.bugs
Message-ID <[email protected]>
Update of bug #68420 (group groff):

                  Status:               Confirmed => In Progress
         Planned Release:                    None => 1.25.0

    _______________________________________________________

Follow-up Comment #5:

Here's a fix.  I'll be pushing regression tests for both the `cc` and `c2`
requests.

`ec` is not affected.


$ git diff
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 57a367f69..d218847d5 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -321,7 +321,7 @@ static void assign_control_character_request() // .cc
   }
   else
     assignment_worked = curenv->set_control_character(cc);
-  assert(assignment_worked);
+  assert(do_nothing || assignment_worked);
   skip_line();
 }
 
@@ -364,7 +364,7 @@ static void assign_no_break_control_character_request() //
.c2
   }
   else
     assignment_worked = curenv->set_no_break_control_character(nbcc);
-  assert(assignment_worked);
+  assert(do_nothing || assignment_worked);
   skip_line();
 }
 




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaiFs/gAKCRCqLAuaBUf3
Th4bAP9ibz3XJV/3Xy+nDabkpwEPO07GR8w6t242LfDieEfXigEA3O9iqHuJsaqm
jSawFtthzAyQRSgHk2yUlLS7FY1B0ww=
=r0fC
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.