gbranden pushed a commit to branch master
in repository groff.

commit 087059d891eefe366ed114e7439a789afdf2c809
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 30 05:05:05 2025 -0600

    [troff]: Fix Savannah #67748 (warnscale recovery).
    
    * src/roff/troff/input.cpp (warnscale_request): Actually reset the
      computed `warn_scale` to `units_per_inch` when recovering from an
      invalid argument and telling the user we're reverting to inches.
    
    Fixes <https://savannah.gnu.org/bugs/?67748>.  Problem dates back to
    intoduction of `warnscale` request in commit 9993a881c1, 5 May 2002.
---
 ChangeLog                | 11 +++++++++++
 src/roff/troff/input.cpp |  1 +
 2 files changed, 12 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 0b3831bce..c89dc8ea1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2025-11-30  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (warnscale_request): Actually reset
+       the computed `warn_scale` to `units_per_inch` when recovering
+       from an invalid argument and telling the user we're reverting to
+       inches.
+
+       Fixes <https://savannah.gnu.org/bugs/?67748>.  Problem dates
+       back to intoduction of `warnscale` request in commit 9993a881c1,
+       5 May 2002.
+
 2025-11-30  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp: Explicitly construct the global
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index cf0743c8b..f7e415013 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8337,6 +8337,7 @@ void warnscale_request()
     warning(WARN_SCALE,
            "scaling unit '%1' invalid; using 'i' instead", c);
     c = 'i';
+    warn_scale = (double) units_per_inch;
   }
   warn_scaling_unit = c;
   skip_line();

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

Reply via email to