3 @@ -460,12 +460,26 @@ TouchEventHistoryPush(TouchPointInfoPtr
4 if (ev->flags & (TOUCH_CLIENT_ID | TOUCH_REPLAYING))
7 + if (ti->history_elements == ti->history_size - 1) {
8 + DeviceEvent *hist = NULL;
9 + size_t sz = ti->history_size * 2;
12 + hist = realloc(ti->history, sz * sizeof(*hist));
16 + ti->history_size = sz;
17 + memset(&hist[sz/2], 0, sizeof(*hist)*sz/2);
22 ti->history[ti->history_elements++] = *ev;
23 - /* FIXME: proper overflow fixes */
24 if (ti->history_elements > ti->history_size - 1) {
25 ti->history_elements = ti->history_size - 1;
26 - DebugF("source device %d: history size %d overflowing for touch %u\n",
27 - ti->sourceid, ti->history_size, ti->client_id);
28 + ErrorF("source device %d: history size %d overflowing for touch %u\n",
29 + ti->sourceid, ti->history_size, ti->client_id);