summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/synaptics.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/synaptics.c b/src/synaptics.c
index 27a37d7..0472197 100644
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -977,6 +977,7 @@ SynapticsReset(SynapticsPrivate * priv)
priv->lastButtons = 0;
priv->prev_z = 0;
priv->prevFingers = 0;
+ priv->num_active_touches = 0;
memset(priv->open_slots, 0, priv->num_slots * sizeof(int));
}
@@ -2611,6 +2612,7 @@ UpdateTouchState(InputInfoPtr pInfo, struct SynapticsHwState *hw)
if (hw->slot_state[i] == SLOTSTATE_OPEN) {
priv->open_slots[priv->num_active_touches] = i;
priv->num_active_touches++;
+ BUG_WARN(priv->num_active_touches > priv->num_slots);
}
else if (hw->slot_state[i] == SLOTSTATE_CLOSE) {
Bool found = FALSE;