[PATCH] correcting mathematical nonsense

Martin Burggraf TSO at gmx.net
Thu Aug 13 12:16:40 PDT 2015


---
 src/xkbtext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xkbtext.c b/src/xkbtext.c
index b5d4750..91abb86 100644
--- a/src/xkbtext.c
+++ b/src/xkbtext.c
@@ -758,7 +758,7 @@ XkbGeomFPText(int val, unsigned format)
     }
     else {
         whole = val / XkbGeomPtsPerMM;
-        frac = val % XkbGeomPtsPerMM;
+        frac = abs(val % XkbGeomPtsPerMM);
         if (frac != 0)
             snprintf(buf, bufsize, "%d.%d", whole, frac);
         else
-- 
2.4.6



More information about the xorg-devel mailing list