array_extract: fix braindeadness.

This commit is contained in:
Arnaud Cornet 2008-12-25 17:49:48 +01:00
parent 7c6cc20e90
commit b102aed08a
1 changed files with 1 additions and 1 deletions

View File

@ -742,7 +742,7 @@ array_t *array_extract(array_t *a, int index, int upto)
/* here we have index < upto */
array_ensure(ret, upto - index - 1);
for (i = index; i < upto; i++)
for (i = 0; i < ret->elemc; i++)
ret->elemv[i] = a->elemv[i + index];
return ret;
}