diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-16 11:04:29 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-04-16 11:04:29 +0300 |
commit | 67f4d070335e12622af1363b71c68489c64f5bc7 (patch) | |
tree | 32f09ad1bcce8d17b4ac036e01158f1f64da971d /mpfr.c | |
parent | 0813c48d190d983cb0b3e55f5d8345c91c43e09b (diff) | |
download | gawk-67f4d070335e12622af1363b71c68489c64f5bc7.tar.gz |
Fixes for intdiv function, including documentation.
Diffstat (limited to 'mpfr.c')
-rw-r--r-- | mpfr.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1224,7 +1224,9 @@ do_mpfr_intdiv(int nargs) } else { if (! mpfr_number_p(numerator->mpg_numbr)) { /* [+-]inf or NaN */ - return numerator; + unref(numerator); + unref(denominator); + return make_number((AWKNUM) -1); } num = mpg_integer(); @@ -1237,7 +1239,10 @@ do_mpfr_intdiv(int nargs) } else { if (! mpfr_number_p(denominator->mpg_numbr)) { /* [+-]inf or NaN */ - return denominator; + unref(numerator); + unref(denominator); + unref(num); + return make_number((AWKNUM) -1); } denom = mpg_integer(); |