gbranden pushed a commit to branch master
in repository groff.

commit a9eb7c0cd86ecee8e637e45ece976d58cb2aea61
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Dec 18 15:10:27 2025 -0600

    [xtotroff]: Fix format string goof.
    
    * src/utils/xtotroff/xtotroff.c (main): Fix thinko in fprintf(3) call;
      that's not one of groff's diagnostic functions, so we must use `%s` in
      its format string, not `%1`.
    
    Fixes problem introduced by me in commit 4b7a0fe5ab, 6 December.
---
 ChangeLog                     | 8 ++++++++
 src/utils/xtotroff/xtotroff.c | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 031233141..b76ded752 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-12-18  G. Branden Robinson <[email protected]>
+
+       * src/utils/xtotroff/xtotroff.c (main): Fix thinko in fprintf(3)
+       call; that's not one of groff's diagnostic functions, so we must
+       use `%s` in its format string, not `%1`.
+
+       Fixes problem introduced by me in commit 4b7a0fe5ab, 6 December.
+
 2025-12-18  G. Branden Robinson <[email protected]>
 
        Recognize materials licensed under LGPLv3.
diff --git a/src/utils/xtotroff/xtotroff.c b/src/utils/xtotroff/xtotroff.c
index 7c38dcd38..aa1ab8af1 100644
--- a/src/utils/xtotroff/xtotroff.c
+++ b/src/utils/xtotroff/xtotroff.c
@@ -325,7 +325,7 @@ int main(int argc, char **argv)
                       "%s: error: unrecognized command-line option"
                       " '%c'\n", program_name, (char) optopt);
       else
-       (void) fprintf(stderr, "unrecognized command-line option '%1'",
+       (void) fprintf(stderr, "unrecognized command-line option '%s'",
                argv[(optind - 1)]);
       usage(stderr);
       xtotroff_exit(2);

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

Reply via email to