summaryrefslogtreecommitdiff
path: root/fofi
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2018-08-31 20:03:36 +0200
committerAlbert Astals Cid <aacid@kde.org>2018-08-31 20:10:17 +0200
commitf200264ddb0a16f54ae2711f399867e659957b1d (patch)
treeccbab0b4d8a1b8e251b68e1e2dcb0a6fcef4eced /fofi
parent9bfc10eecb57354270806aa1d9278eebb1db2287 (diff)
FoFiType1C::getDeltaIntArray: Fix undefined inf to int conversion
Diffstat (limited to 'fofi')
-rw-r--r--fofi/FoFiType1C.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 643bc9e1..ebf68a44 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -2665,6 +2665,9 @@ int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) {
x = 0;
for (i = 0; i < n; ++i) {
int y;
+ if (unlikely(isinf(ops[i].num))) {
+ return i;
+ }
if (checkedAdd(x, (int)ops[i].num, &y)) {
return i;
}