Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9d3a5ae

Browse files
author
Stefan Krah
committed
Defensive programming: mpd_isspecial(r) already implies mpd_isspecial(q), but
this is more readable.
1 parent 3c23a87 commit 9d3a5ae

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/_decimal/libmpdec/mpdecimal.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3530,6 +3530,7 @@ _mpd_qdiv(int action, mpd_t *q, const mpd_t *a, const mpd_t *b,
35303530
MPD_NEW_STATIC(r,0,0,0,0);
35313531
_mpd_base_ndivmod(q, &r, a, b, status);
35323532
if (mpd_isspecial(q) || mpd_isspecial(&r)) {
3533+
mpd_setspecial(q, MPD_POS, MPD_NAN);
35333534
mpd_del(&r);
35343535
goto finish;
35353536
}

0 commit comments

Comments
 (0)