Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/tests/uiautomation.c:
ComEventData.exp_node_desc.nested_desc[i] = &ComEventData.exp_nested_node_desc;
stack->exp_nested_node_desc[idx] = *exp_node_desc->nested_desc[i];
} elsestack->exp_node_desc[idx].nested_desc[i] = &stack->exp_nested_node_desc[idx]; break; } }
memset(&ComEventData.exp_node_desc, 0, sizeof(ComEventData.exp_node_desc));
memset(&stack->exp_node_desc[idx], 0, sizeof(stack->exp_node_desc[idx]));
- stack->exp_event_count++;
+}
+static struct node_provider_desc *pop_event_stack_event(struct ExpectedEventStack *stack) +{
- if (!stack->exp_event_count || stack->exp_event_pos >= MAX_EVENT_STACK_COUNT)
Shouldn't this be comparing to the number of actual items in the structure, rather than the theoretical maximum?