gbranden pushed a commit to branch master
in repository groff.
commit 0c5e4b9d8b09434d6720e547e918d6205a64c4f7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Oct 3 21:48:53 2022 -0500
[troff]: Fix Savannah #63149.
* src/roff/troff/reg.cpp (alter_format): Throw comprehensible diagnostic
when input delete character encountered in register format.
Fixes <https://savannah.gnu.org/bugs/?63149>.
---
ChangeLog | 10 ++++++++++
src/roff/troff/reg.cpp | 5 ++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index ce4146502..804ef3ded 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-10-03 G. Branden Robinson <[email protected]>
+
+ [troff]: Fix Savannah #63149.
+
+ * src/roff/troff/reg.cpp (alter_format): Throw comprehensible
+ diagnostic when input delete character encountered in register
+ format.
+
+ Fixes <https://savannah.gnu.org/bugs/?63149>.
+
2022-10-03 G. Branden Robinson <[email protected]>
[troff]: Describe an input delete character comprehensibly.
diff --git a/src/roff/troff/reg.cpp b/src/roff/troff/reg.cpp
index a3139f447..27065db4e 100644
--- a/src/roff/troff/reg.cpp
+++ b/src/roff/troff/reg.cpp
@@ -403,7 +403,10 @@ void alter_format()
else if (tok.is_newline() || tok.is_eof())
warning(WARN_MISSING, "missing register format");
else
- error("bad register format (got %1)", tok.description());
+ if (!cscntrl(c))
+ error("invalid register format '%1'", c);
+ else
+ error("invalid register format (got %1)", tok.description());
skip_line();
}
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit