use the is_empty api call for peek
This commit is contained in:
parent
e4652c0319
commit
414608ff25
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue