gbranden pushed a commit to branch master
in repository groff.

commit 7d644e8da5bd05304b5164262f3cb0408954873b
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Dec 3 00:02:55 2025 -0600

    [troff]: Fix my own derpery.
    
    * src/roff/troff/input.cpp (token::description): Return the node token
      description using the correct buffer.
    
    Illustration:
    
    $ printf '\\C\\v"1m"\n' | ~/groff-HEAD/bin/groff -aww
    troff:<standard input>:1: warning: cannot use  to delimit a name
    <beginning of page>
    $ printf '\\C\\v"1m"\n' | ./build/test-groff -aww
    troff:<standard input>:1: warning: cannot use a vertical motion node to 
delimit a name
    <beginning of page>
---
 ChangeLog                | 5 +++++
 src/roff/troff/input.cpp | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 71a535a4c..b8e544f06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-12-03  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (token::description): Return the node
+       token description using the correct buffer.
+
 2025-12-02  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (token::description): Hedge against
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index aac808fab..49ac069fc 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2984,9 +2984,9 @@ const char *token::description()
   case TOKEN_NODE:
     {
       static char nodebuf[bufsz];
-      (void) strcpy(buf, "an undescribed node");
+      (void) strcpy(nodebuf, "an undescribed node");
       describe_node(nodebuf, bufsz);
-      return buf;
+      return nodebuf;
     }
   case TOKEN_INDEXED_CHAR:
     (void) snprintf(buf, maxstr, "indexed character %d",

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to