gbranden pushed a commit to branch master
in repository groff.
commit 643afa4b08ca974e5ecdccf63b4254150ae0d758
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 24 18:35:27 2025 -0600
src/roff/troff/number.cpp: Fix cosmetic code nits.
* Fix indentation.
* Move comment and improve its explanation.
---
src/roff/troff/number.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp
index 3de389b9d..a55c24eef 100644
--- a/src/roff/troff/number.cpp
+++ b/src/roff/troff/number.cpp
@@ -474,7 +474,6 @@ static bool is_valid_term(units *u, int scaling_unit,
case '9':
*u = 0;
do {
- // If wrapping, don't `break`; eat and discard further digits.
if (!is_overflowing) {
saved_u = *u;
if (ckd_mul(u, *u, 10))
@@ -483,7 +482,8 @@ static bool is_valid_term(units *u, int scaling_unit,
is_overflowing = true;
if (is_overflowing)
*u = saved_u;
- }
+ }
+ // No `else` on overflow; consume and discard further digits.
tok.next();
c = tok.ch();
} while (csdigit(c));
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit