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

POSLIB_FLAG_EVENT overflow in callback event_id #50

Open
sforconi opened this issue May 13, 2022 · 0 comments
Open

POSLIB_FLAG_EVENT overflow in callback event_id #50

sforconi opened this issue May 13, 2022 · 0 comments

Comments

@sforconi
Copy link

In file poslib.h:
the event: POSLIB_FLAG_EVENT_LED_OFF is defined as POSLIB_FLAG_EVENT_LED_OFF = 256,
but in the callback function: poslib_events_listen_info_f, called at line 228 in poslib_event.c,
the callback argument structure POSLIB_FLAG_EVENT_info_t, has the event_id field defined as uint8_t, thus the value 256 will be trucated to 0, remapping onto POSLIB_FLAG_EVENT_NONE.

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

1 participant