touchpad: tp_current_touch: Fix off by one error

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Hans de Goede 2014-06-18 14:22:24 +02:00 committed by Peter Hutterer
parent 6fa0c9aa97
commit 92a67a3a94

View file

@ -139,7 +139,7 @@ tp_motion_history_reset(struct tp_touch *t)
static inline struct tp_touch *
tp_current_touch(struct tp_dispatch *tp)
{
return &tp->touches[min(tp->slot, tp->ntouches)];
return &tp->touches[min(tp->slot, tp->ntouches - 1)];
}
static inline struct tp_touch *