gbranden pushed a commit to branch master
in repository groff.
commit 1a5896b98fbfffd375d0457fbd8f05299e4e2f84
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Jun 14 18:01:30 2025 -0500
[troff]: Fix thinkos in static char array init.
* src/roff/troff/input.cpp (charinfo::dump): Fix thinko when
initializing static `char` array literals. `none` requires only (one)
null terminator. Append one to `comma`.
---
ChangeLog | 6 ++++++
src/roff/troff/input.cpp | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 801a0ed0f..0eec63782 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-06-14 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (charinfo::dump): Fix thinko when
+ initializing static `char` array literals. `none` requires only
+ {one} null terminator. Append one to `comma`.
+
2025-06-08 G. Branden Robinson <[email protected]>
[pic]: Add unit test for `polygon` command.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 9d08a8c28..28fd5fe92 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -10369,8 +10369,8 @@ void charinfo::dump()
if (0U == flags)
errprint("none)\n");
else {
- char none[] = { '\0', '\0' };
- char comma[] = { ',', ' ' };
+ char none[] = { '\0' };
+ char comma[] = { ',', ' ', '\0' };
char *separator = none;
if (flags & ENDS_SENTENCE) {
errprint("%1ends sentence", separator);
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit