BUG 0.99.5 gtktext.c + patch



These two lines are in the wrong position and will cause a crash.

Tony

--- gtktext.c.orig      Tue Mar 10 10:22:06 1998
+++ gtktext.c   Tue Mar 10 10:22:25 1998
@@ -828,12 +828,12 @@
   gchar *p;
   guint n, nchars;

-  if (end_pos < 0)
-    end_pos = TEXT_LENGTH (text);
-
   g_return_val_if_fail (editable != NULL, NULL);
   g_return_val_if_fail (GTK_IS_TEXT (editable), NULL);
   text = GTK_TEXT (editable);
+
+  if (end_pos < 0)
+    end_pos = TEXT_LENGTH (text);

   if (end_pos > TEXT_LENGTH (text))
     return NULL;                               
--
E-Mail: Tony Gale <gale@daedalus.dera.gov.uk>
Before you ask more questions, think about whether you really want to
know the answers.
                -- Gene Wolfe, "The Claw of the Conciliator"

The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.



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