Fix another (and with any luck the last) bug in vector.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5785 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
9fb5fd1718
commit
b8d25a33e2
|
@ -63,7 +63,7 @@ void *vectorAdd(vector *v, void *object)
|
|||
|
||||
void *vectorAt(vector *v, int index)
|
||||
{
|
||||
return (index <= v->head && v->head >= 0) ? v->mem[index] : NULL;
|
||||
return (index < v->head && index >= 0) ? v->mem[index] : NULL;
|
||||
}
|
||||
|
||||
void *vectorHead(vector *v)
|
||||
|
|
Loading…
Reference in New Issue