GtkClist 1.2.8 bug and patch



I've had seg faults from gtk_clist_optimal_column_width when the
column is invalid.  I think I've found the problem, to which I offer
the following patch:

--- gtkclist.c.orig	Tue Dec 12 11:49:31 2000
+++ gtkclist.c	Tue Dec 12 11:50:23 2000
@@ -1700,7 +1700,7 @@
   g_return_val_if_fail (clist != NULL, 0);
   g_return_val_if_fail (GTK_CLIST (clist), 0);
 
-  if (column < 0 || column > clist->columns)
+  if (column < 0 || column >= clist->columns)
     return 0;
 
   if (GTK_CLIST_SHOW_TITLES(clist) && clist->column[column].button)

Hope this helps.

Cheers,
Dave

-- 
Dave Lambert		mailto://dlambert acm org
Portsmouth, England	phone-home://+44 23 9236 5439
[This space for sale]	phone-work://+44 23 9233 6272
--
Your mouse has moved.  Windows NT must be restarted 
for the change to take effect.  Reboot now? [OK].





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