mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 13:30:06 +01:00
libevdev_is_event_type() needs to check for < EV_CNT
EV_MAX is a valid (though unused) value. Reported-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
ce7e2f1516
commit
fed9963973
1 changed files with 1 additions and 1 deletions
|
|
@ -1166,7 +1166,7 @@ libevdev_grab(struct libevdev *dev, enum libevdev_grab_mode grab)
|
|||
int
|
||||
libevdev_is_event_type(const struct input_event *ev, unsigned int type)
|
||||
{
|
||||
return type < EV_MAX && ev->type == type;
|
||||
return type < EV_CNT && ev->type == type;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue