diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-01-25 07:32:34 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-01-25 07:32:34 -0800 |
commit | 86cbd44a9b356ffe325887064e93363f8bec1b44 (patch) | |
tree | 687f77755f3fc3a8589ec7ca9c3e22373c802f4e | |
parent | b62de9326d9844661458c8f83e4c7ded5fa02f2d (diff) | |
download | txr-86cbd44a9b356ffe325887064e93363f8bec1b44.tar.gz txr-86cbd44a9b356ffe325887064e93363f8bec1b44.tar.bz2 txr-86cbd44a9b356ffe325887064e93363f8bec1b44.zip |
mul: add forgotten MPI error check.
* arith.c (mul): In code that is only compiled when
HAVE_DOUBLE_INTPTR_T is missing/zero, we need to test the
return value of MPI's mp_mul.
-rw-r--r-- | arith.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -845,11 +845,14 @@ tail: } else { val n = make_bignum(); mp_int tmpb; + mp_err mpe; mp_init(&tmpb); mp_set_intptr(&tmpb, b); mp_set_intptr(mp(n), a); - mp_mul(mp(n), &tmpb, mp(n)); + mpe = mp_mul(mp(n), &tmpb, mp(n)); mp_clear(&tmpb); + if (mpe != MP_OKAY) + do_mp_error(self, mpe); return n; } #endif |