use the is_empty api call for peek

This commit is contained in:
Lowly Worm 2017-06-06 00:27:50 -04:00
parent e4652c0319
commit 414608ff25

View file

@ -74,7 +74,7 @@ R_API unsigned int r_stack_size(RStack *s) {
R_API void *r_stack_peek(RStack *s) {
void *res;
if (s->top != -1) {
if (!r_stack_is_empty (s)) {
res = s->elems[s->top];
return res;
}