Skip to content

POSLIB_FLAG_EVENT overflow in callback event_id #50

Description

@sforconi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions