Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the codegenerator in funciton: bool codegen_response_acknowledged(struct response* res) #7

Open
fedi-nabli opened this issue Aug 5, 2023 · 2 comments

Comments

@fedi-nabli
Copy link

Hello Daniel, I wanted to point out, that in the codegen_response_acknowledged function, I found a BUG; If we're checking the flags we should type type:

bool codegen_response_acknowledged(struct response* res)
{
  return res && res->flags & RESPONSE_FLAG_ACKNOWLEDGED;
}

(the double && should be & in the flags) instead of:

bool codegen_response_acknowledged(struct response* res)
{
  return res && res->flags && RESPONSE_FLAG_ACKNOWLEDGED;
}

thank you

@nibblebits
Copy link
Owner

Thank you for bringing this to my attention you are correct this should be a bitwise AND not a logical AND

@nibblebits
Copy link
Owner

Hello,
Thanks for reaching out, once theres enough issue reports I will go through them all and create a lecture addressing any issues.

Thanks
Dan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants