Revision: 2905
http://hugin.svn.sourceforge.net/hugin/?rev=2905&view=rev
Author: tksharpless
Date: 2008-02-21 04:41:10 -0800 (Thu, 21 Feb 2008)
Log Message:
-----------
ArrayList_new() was initializing list full instead of empty, leaving (dim) null entries at start of list.
Modified Paths:
--------------
autopano-sift-C/trunk/ArrayList.c
Modified: autopano-sift-C/trunk/ArrayList.c
===================================================================
--- autopano-sift-C/trunk/ArrayList.c 2008-02-20 22:57:55 UTC (rev 2904)
+++ autopano-sift-C/trunk/ArrayList.c 2008-02-21 12:41:10 UTC (rev 2905)
@@ -20,11 +20,11 @@
ArrayList* ArrayList_new(int dim, void* deletefn)
{
ArrayList* self = ArrayList_new0(deletefn);
- self->count = dim;
+ self->count = 0;
self->reserved = dim;
self->items = (void**)malloc(self->reserved * sizeof(void*));
int index;
- for(index=0; index<self->count; index++) {
+ for(index=0; index<self->reserved; index++) {
self->items[index] = NULL;
}
return self;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|