X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=linux%2Fin_evdev.c;h=e6bdad1567203d2b2163c60b9bda85bd731d1899;hb=4ec1acc11b956edc554c72a5ee4e7d875d188ee6;hp=a51fe2deecda78e90171e98f9c67e2036d51ff46;hpb=e30684582a48d76887f63838bde0308dab01f97f;p=libpicofe.git diff --git a/linux/in_evdev.c b/linux/in_evdev.c index a51fe2d..e6bdad1 100644 --- a/linux/in_evdev.c +++ b/linux/in_evdev.c @@ -570,7 +570,9 @@ static void in_evdev_get_def_binds(int *binds) { int i; - for (i = 0; in_evdev_defbinds[i].bit != 0; i++) { + for (i = 0; ; i++) { + if (in_evdev_defbinds[i].bit == 0 && in_evdev_defbinds[i].code == 0) + break; binds[IN_BIND_OFFS(in_evdev_defbinds[i].code, in_evdev_defbinds[i].btype)] = 1 << in_evdev_defbinds[i].bit; }