changeset 11155:0aede77c1593

(Fmod): Fix the final adjustment, when i2 < 0 and i1 == 0.
author Richard M. Stallman <rms@gnu.org>
date Thu, 30 Mar 1995 23:34:59 +0000
parents df80277264ec
children 31a046cedfc8
files src/data.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/data.c	Thu Mar 30 07:31:38 1995 +0000
+++ b/src/data.c	Thu Mar 30 23:34:59 1995 +0000
@@ -1951,7 +1951,7 @@
   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);