Fix bugs in handling multiple simultaneous ambiguities

This commit is contained in:
Max Brunsfeld 2015-10-22 11:42:38 -07:00
parent 0955f660d0
commit 500533476b
5 changed files with 3377 additions and 2852 deletions

View file

@ -168,9 +168,8 @@ static int ts_stack__find_or_add_head(Stack *self, StackNode *node) {
void ts_stack_remove_head(Stack *self, int head_index) {
stack_node_release(self->heads[head_index]);
for (int i = head_index; i < self->head_count - 1; i++) {
self->heads[head_index] = self->heads[head_index + 1];
}
for (int i = head_index; i < self->head_count - 1; i++)
self->heads[i] = self->heads[i + 1];
self->head_count--;
}