From: Richard M. Stallman Date: Thu, 30 Mar 1995 23:34:59 +0000 (+0000) Subject: (Fmod): Fix the final adjustment, when i2 < 0 and i1 == 0. X-Git-Tag: emacs-19.34~4703 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=04f7ec6929c3e4db2b5515e1e133a716f1bf8cb4;p=emacs.git (Fmod): Fix the final adjustment, when i2 < 0 and i1 == 0. --- diff --git a/src/data.c b/src/data.c index be10e71f3b5..41f74cb98e1 100644 --- a/src/data.c +++ b/src/data.c @@ -1951,7 +1951,7 @@ Both X and Y must be numbers or markers.") i1 %= i2; /* If the "remainder" comes out with the wrong sign, fix it. */ - if ((i1 < 0) != (i2 < 0)) + if (i2 < 0 ? i1 > 0 : i1 < 0) i1 += i2; XSETINT (val, i1);