mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 04:40:05 +01:00
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:
parent
6fa0c9aa97
commit
92a67a3a94
1 changed files with 1 additions and 1 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue