From 04f7ec6929c3e4db2b5515e1e133a716f1bf8cb4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 30 Mar 1995 23:34:59 +0000 Subject: [PATCH] (Fmod): Fix the final adjustment, when i2 < 0 and i1 == 0. --- src/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5