gbranden pushed a commit to branch master
in repository groff.
commit 7716dce205d2cd9df018585312eec1651bb9d351
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Jul 5 20:31:17 2026 -0500
src/roff/troff/node.cpp: Fix code nit.
* src/roff/troff/node.cpp (suppress_node::suppress_node): Initialize
`position` with a valid value; while typed `char`, it is actually an
enumerated type in disguise, and zero (or `\0`) is not a valid value.
See `src/roff/troff/input.cpp:do_suppress()`.
---
ChangeLog | 8 ++++++++
src/roff/troff/node.cpp | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 87931d188..0e634e879 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2026-07-05 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/node.cpp (suppress_node::suppress_node):
+ Initialize `position` with a valid value; while typed `char`, it
+ is actually an enumerated type in disguise, and zero (or `\0`)
+ is not a valid value. See
+ `src/roff/troff/input.cpp:do_suppress()`.
+
2026-07-05 G. Branden Robinson <[email protected]>
[groff]: Add unit test for `fzoom` request.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 3b14f2442..f2ec44f10 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4489,7 +4489,7 @@ tfont *device_extension_node::get_tfont()
suppress_node::suppress_node(int on_or_off, int issue_limits)
: is_on(on_or_off), emit_limits(issue_limits),
- filename(0 /* nullptr */), position(0), image_id(0)
+ filename(0 /* nullptr */), position('l'), image_id(0)
{
}
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit