Skip to content

Commit 5b567e3

Browse files
committed
fix: StackPeek
1 parent 2322aeb commit 5b567e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ element_t* StackPeek (const Stack* stack, unsigned int* err = NULL)
257257
}
258258

259259
TRY_ASSIGN_PTR(err, err_flags);
260-
return stack->data + stack->size;
260+
return stack->data + stack->size - 1;
261261
}
262262

263263
unsigned int StackCheck_(const Stack* stack)

0 commit comments

Comments
 (0)