Skip to content

Commit

Permalink
Fix Stack::isFull()
Browse files Browse the repository at this point in the history
  • Loading branch information
lopatar committed Nov 1, 2023
1 parent 31af32a commit 1fb9922
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sdk/Structures/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ public function isEmpty(): bool

public function isFull(): bool
{
return $this->topIndex === $this->size;
return $this->topIndex === $this->size - 1;
}
}

0 comments on commit 1fb9922

Please sign in to comment.