rem: if (index < 0 || index >= bag->count) return;
add: wassertr(index >= 0 && index < bag->count);
context: WMDeleteFromBag(WMBag *bag, int index){    if (index < 0 || index >= bag->count)	return;        if (index < bag->count-1) {	memmove(&bag->items[index], &bag->items[index + 1],		(bag->count - index - 1) * sizeof(void*));    }    bag->count--;}