pfelt-Urct4Ww6//Pz1n+
2009-07-09 04:19:02 UTC
I've done some test cases on paper and think that the comment here is the
right way. /me would like a double check on the logic before
committing...
mail memmgr-glib # svn diff
Index: src/libs/bongoutil/array.c
===================================================================
--- src/libs/bongoutil/array.c (revision 1098)
+++ src/libs/bongoutil/array.c (working copy)
@@ -149,6 +149,9 @@
return;
}
+ /* i belive the byte count should be
+ * array->data + (array->len * array->elemSize) - array->data + (i *
array->elemSize) + elemSize
+ */
memmove((char *)array->data + (i * array->elemSize),
(char*)array->data + ((i + 1) * array->elemSize),
(array->elemSize * (array->len - i)));
mail memmgr-glib #
right way. /me would like a double check on the logic before
committing...
mail memmgr-glib # svn diff
Index: src/libs/bongoutil/array.c
===================================================================
--- src/libs/bongoutil/array.c (revision 1098)
+++ src/libs/bongoutil/array.c (working copy)
@@ -149,6 +149,9 @@
return;
}
+ /* i belive the byte count should be
+ * array->data + (array->len * array->elemSize) - array->data + (i *
array->elemSize) + elemSize
+ */
memmove((char *)array->data + (i * array->elemSize),
(char*)array->data + ((i + 1) * array->elemSize),
(array->elemSize * (array->len - i)));
mail memmgr-glib #