Hi all,

Another bug deeper in the code asks GNU Cash to try and print the number
"infinity". This hangs the display routine, which tries to count the
number of times it can multiply the size of the value being printed by
0.001, but infinity multiplied by anything is infinity, so infinite loop develops.

This is the fix:

*** gnucash-1.2.1-old/src/engine/util.c Mon Jul  5 19:00:03 1999
--- gnucash-1.2.1/src/engine/util.c     Tue Jul 20 18:30:36 1999
***************
*** 182,187 ****
--- 182,193 ----
     double tmp, amt=0.0;
     char *start = buf;
  
+    /* check if we're printing infinity */
+    if (!finite(val)) {
+       strcpy (buf, "inf");
+       return 3;
+    }
+ 
     /* count number of commas */
     tmp = val;
     while (tmp > 1000.0) {

Regards,
Graham
--
----- %< -------------------------------------------- >% ------
The GnuCash / X-Accountant Mailing List
To unsubscribe, send mail to [EMAIL PROTECTED] and
put "unsubscribe gnucash-devel [EMAIL PROTECTED]" in the body

Reply via email to