Compare commits

...

1 Commits
master ... v1.3

Author SHA1 Message Date
K. Lange
371ddc48be Backport fix 2023-02-09 10:59:11 +09:00

View File

@ -398,7 +398,9 @@ static int krk_long_add(KrkLong * res, const KrkLong * a, const KrkLong * b) {
FINISH_OUTPUT(res); FINISH_OUTPUT(res);
return 0; return 0;
} }
return 1; krk_long_clear(res);
FINISH_OUTPUT(res);
return 0;
} else if (a->width > 0 && b->width < 0) { } else if (a->width > 0 && b->width < 0) {
switch (krk_long_compare_abs(a,b)) { switch (krk_long_compare_abs(a,b)) {
case -1: case -1:
@ -412,8 +414,9 @@ static int krk_long_add(KrkLong * res, const KrkLong * a, const KrkLong * b) {
FINISH_OUTPUT(res); FINISH_OUTPUT(res);
return 0; return 0;
} }
krk_long_clear(res);
FINISH_OUTPUT(res); FINISH_OUTPUT(res);
return 1; return 0;
} }
/* sign must match for this, so take it from whichever */ /* sign must match for this, so take it from whichever */