groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 04/32: [troff]: Fix Savannah #63149.


From: G. Branden Robinson
Subject: [groff] 04/32: [troff]: Fix Savannah #63149.
Date: Thu, 6 Oct 2022 09:11:21 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit 0c5e4b9d8b09434d6720e547e918d6205a64c4f7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
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 <g.branden.robinson@gmail.com>
+
+       [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 <g.branden.robinson@gmail.com>
 
        [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();
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]