summaryrefslogtreecommitdiff
path: root/fofi/FoFiType1C.cc
diff options
context:
space:
mode:
Diffstat (limited to 'fofi/FoFiType1C.cc')
-rw-r--r--fofi/FoFiType1C.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index caa4b42b..63518452 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -2663,7 +2663,11 @@ int FoFiType1C::getDeltaIntArray(int *arr, int maxLen) {
}
x = 0;
for (i = 0; i < n; ++i) {
- x += (int)ops[i].num;
+ int y;
+ if (checkedAdd(x, (int)ops[i].num, &y)) {
+ return i;
+ }
+ x = y;
arr[i] = x;
}
return n;