Skip to content

Another error in pop function! #2

@vian96

Description

@vian96

Hello!
I am that guy who submitted you to solve an error. I waited so long for you to answer but you haven't done it yet. So I was very upset and I've found another error!!!! It tries to get values from empty stack when you call pop. It is better for you to solve this problem as soon as possible because it may cause some problems for you. To see this bug in action insert code below:

stack_t stack = {};

int stackError = STACKCTOR_(&stack, 10);

int x = 100-1337;

// tries to get element from empty stack
// (but screams stack is not ok when size of data underflows to infinity)
 StackPop (&stack, &x);

It screams about error but not about the reason.

Good luck coding next time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions