gbranden pushed a commit to branch master
in repository groff.
commit 95d04688e71c82cb2560567d2d41536b24ec6714
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu Jul 18 22:08:03 2024 -0500
src/roff/troff/number.cpp: Note non-wraparound.
---
src/roff/troff/number.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/roff/troff/number.cpp b/src/roff/troff/number.cpp
index 30bd76956..ba34eda1c 100644
--- a/src/roff/troff/number.cpp
+++ b/src/roff/troff/number.cpp
@@ -673,6 +673,7 @@ units scale(units n, units x, units y)
return (n*x)/y;
}
double res = n*double(x)/double(y);
+ // We don't implement integer wraparound when scaling.
if (res > INT_MAX) {
error("numeric overflow");
return INT_MAX;
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit