gbranden pushed a commit to branch master
in repository groff.
commit 77f6ba2a4ec8ef48d94004aefb5bc0efa6bd5a2b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Dec 5 05:33:16 2025 -0600
[troff]: Fix Savannah #67771.
* src/roff/troff/input.cpp (define_class_request): Stop warning on
trailing space after arguments to `class` request. Populate local
variable `child1` (which helps us keep track of range expressions)
only if the current token is a kind of character.
Fixes <https://savannah.gnu.org/bugs/?67771>. Problem appears to date
back to commit 1cb8dd7bde, 13 December 2010.
---
ChangeLog | 10 ++++++++++
src/roff/troff/input.cpp | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 84da01d93..e838c257a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-12-05 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (define_class_request): Stop warning
+ on trailing space after arguments to `class` request. Populate
+ local variable `child1` (which helps us keep track of range
+ expressions) only if the current token is a kind of character.
+
+ Fixes <https://savannah.gnu.org/bugs/?67771>. Problem appears
+ to date back to commit 1cb8dd7bde, 13 December 2010.
+
2025-12-05 G. Branden Robinson <[email protected]>
[groff]: Regression-test Savannah #67771.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 15ace1988..a96ba43a0 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8731,7 +8731,8 @@ static void define_class_request()
}
child1 = 0 /* nullptr */;
}
- child1 = tok.get_charinfo(true /* required */);
+ if (tok.is_any_character())
+ child1 = tok.get_charinfo(true /* required */);
tok.next();
if (0 /* nullptr */ == child1) {
if (!tok.is_newline())
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit