Explorar o código

* fixed round(currency) after r18746 (in particular on platforms where
currency is implemented via int64)

git-svn-id: trunk@21096 -

Jonas Maebe %!s(int64=13) %!d(string=hai) anos
pai
achega
aa92d78c46
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      rtl/inc/gencurr.inc

+ 3 - 1
rtl/inc/gencurr.inc

@@ -37,7 +37,9 @@
         { (int64(tmyrec(c))(+/-)5000) div 10000 can overflow }
         result := int64(c);
         rem := c - currency(result);
-        absrem := abs(rem);
+        absrem := rem;
+        if absrem < 0 then
+          absrem := -absrem;
         if (absrem > 0.5) or
            ((absrem = 0.5) and
             (rem > 0)) then