From 7a7595e04445aeb45883b6b94d0641d56b3138c3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 30 Aug 2017 14:49:05 +1000 Subject: [PATCH] test: fix the litest_touch_move_to() step counter We were undercounting by one, causing a slight jump by (step-distance * 2) on the last event. Signed-off-by: Peter Hutterer --- test/litest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/litest.c b/test/litest.c index d832adc4..d63b4d7a 100644 --- a/test/litest.c +++ b/test/litest.c @@ -1866,7 +1866,7 @@ litest_touch_move_to(struct litest_device *d, double x_to, double y_to, int steps, int sleep_ms) { - for (int i = 1; i < steps - 1; i++) { + for (int i = 1; i < steps; i++) { litest_touch_move(d, slot, x_from + (x_to - x_from)/steps * i, y_from + (y_to - y_from)/steps * i);