Fix out of bounds in stack
This commit is contained in:
parent
b54fb6bfa3
commit
9970b3da05
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ stack_pop(struct stack *st)
|
|||
if (!st->size)
|
||||
return NULL;
|
||||
|
||||
return st->item[st->size--];
|
||||
return st->item[--st->size];
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue