fix unshift

This commit is contained in:
Sami Samhuri 2011-04-21 21:27:49 -07:00
parent 1bcf043f86
commit 42f982f9ef

View file

@ -146,9 +146,9 @@ LakeVal *list_unshift(LakeList *list, LakeVal *val)
list_grow(list);
}
size_t i = list->n++;
while (i--) {
do {
list->vals[i] = list->vals[i - 1];
}
} while (i--);
list->vals[0] = val;
}
return NULL;