Check max to see if an event type is valid
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 24 Oct 2013 04:30:40 +0000 (14:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 24 Oct 2013 05:13:41 +0000 (15:13 +1000)
commitc4111f717a404ef5a726aa2dd420daa654455af5
treebb42a26bdd0e0930242d93c6747c12ad931745f4
parent521ba2300e548c0ce7634108d5edaef834a023ed
Check max to see if an event type is valid

There's a gap in the range between EV_SW and EV_LED. Trying to enable one
of those bits will segfault.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
libevdev/libevdev.c
test/test-libevdev-has-event.c