diff --git a/stack/stack.c b/stack/stack.c index b5ffa0a..6203ae0 100644 --- a/stack/stack.c +++ b/stack/stack.c @@ -29,7 +29,7 @@ bool isEmpty(Stack *stack) bool isFull(Stack *stack) { - if (stack->topIndex == (int) stack->capacity) + if (stack->topIndex == (int) stack->capacity - 1) return true; else return false;