gbranden pushed a commit to branch master
in repository groff.
commit bbb7f0bf4ec792f34d7afe4612cca4d6ca858380
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jun 4 07:22:34 2026 -0500
[troff]: Fix Savannah #68420.
* src/roff/troff/input.cpp (assign_control_character_request)
(assign_no_break_control_character_request): Fix (further) blunders in
assert(3) usage. Spurious assertion failures occurred when user
attempted to set a control character to one that is already in use as
the other control character, or the escape character.
Fixes <https://savannah.gnu.org/bugs/?68420>. Problem introduced by me
in commit 20feac542d, 2025-11-23. Thanks to Martin Simmons for the
report.
ANNOUNCE: Acknowledge Martin.
---
ANNOUNCE | 1 +
ChangeLog | 13 +++++++++++++
src/roff/troff/input.cpp | 4 ++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ANNOUNCE b/ANNOUNCE
index e69c6f7c1..3e339c1fb 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -220,6 +220,7 @@ Hilmar Preuße
Johannes Altmanninger
John Gardner
Karl Berry
+Martin Simmons
Morten Bo Johansen
Richard Purdie
Ross Burton
diff --git a/ChangeLog b/ChangeLog
index 03cedf117..d61299c09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2026-06-04 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (assign_control_character_request)
+ (assign_no_break_control_character_request): Fix (further)
+ blunders in assert(3) usage. Spurious assertion failures
+ occurred when user attempted to set a control character to one
+ that is already in use as the other control character, or the
+ escape character.
+
+ Fixes <https://savannah.gnu.org/bugs/?68420>. Problem
+ introduced by me in commit 20feac542d, 2025-11-23. Thanks to
+ Martin Simmons for the report.
+
2026-06-04 G. Branden Robinson <[email protected]>
[groff]: Regression-test Savannah #68420.
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();
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit