Browse Source

* fixed web bug #2131

Jonas Maebe 23 years ago
parent
commit
60183c693c
1 changed files with 6 additions and 2 deletions
  1. 6 2
      rtl/inc/real2str.inc

+ 6 - 2
rtl/inc/real2str.inc

@@ -154,7 +154,8 @@ var
           (not overflow and (stackPtr = maxDigits+1)) or (currPrec = 0);
           (not overflow and (stackPtr = maxDigits+1)) or (currPrec = 0);
     { round if we didn't use all available digits yet and if the }
     { round if we didn't use all available digits yet and if the }
     { remainder is > 5                                           }
     { remainder is > 5                                           }
-    if overflow  and
+    if (overflow or
+        (stackPtr < maxDigits+1)) and
        (trunc(intPartStack[stackPtr]-corrVal) > 5.0 - roundCorr) then
        (trunc(intPartStack[stackPtr]-corrVal) > 5.0 - roundCorr) then
       roundStr(temp,spos);
       roundStr(temp,spos);
 {$ifdef DEBUG_NASM}
 {$ifdef DEBUG_NASM}
@@ -438,7 +439,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.6  2002-09-07 15:07:46  peter
+  Revision 1.7  2002-10-04 16:41:17  jonas
+    * fixed web bug 2131
+
+  Revision 1.6  2002/09/07 15:07:46  peter
     * old logs removed and tabs fixed
     * old logs removed and tabs fixed
 
 
 }
 }