[Patch] Bug in g_ptr_array_remove_index()



There's a bug in g_ptr_array_remove_index() in garray.h in glib.
Here's a patch:

cvs server: Diffing .
Index: garray.c
===================================================================
RCS file: /cvs/gnome/glib/garray.c,v
retrieving revision 1.11
diff -u -r1.11 garray.c
--- garray.c    1998/12/16 05:38:16     1.11
+++ garray.c    1998/12/17 02:56:21
@@ -338,7 +338,7 @@
   
   if (index != array->len - 1)
     g_memmove (array->pdata + index, array->pdata + index + 1, 
-              array->len - index - 1);
+              sizeof(gpointer) * (array->len - index - 1));
   
   array->pdata[array->len - 1] = NULL;
 




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