[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#228187: gtkgraph: infinite loop



merge 228187 228259
thanks

Le Fri, Jan 16, 2004 at 09:18:20PM -0500, Raphael Assenat écrivait:
> In the Set Range dialog, if you set 'X minimum' and 'X maximum' to the
> same value, and there is a function defined (say: y=x), the program
> seems to start some sort of endless loop, which consumes a lot of
> memory. The program gui stops working and it must be killed.

Fixed with attached patch.

Regards,

Laurent.
--- src/gtkplot.c.old	2004-01-27 22:13:19.000000000 +0100
+++ src/gtkplot.c	2004-01-27 22:37:33.000000000 +0100
@@ -1176,6 +1176,8 @@
                 fx[function.num_points-1] = x;
                 fy[function.num_points-1] = y;
               }
+            if (x + inverse_dx(plot, function.x_step) == x)
+                break; /* avoid endless loop */
          }
        if(function.num_points > 1 ) 
          {

Attachment: signature.asc
Description: Digital signature


Reply to: