fixed: freeze on touching in boot #57

This commit is contained in:
TT 2019-09-29 13:19:42 +09:00
parent 0f24a6bd7f
commit 30d33571fa

12
plot.c
View file

@ -942,11 +942,15 @@ search_index_range_x(int x, uint32_t index[101], int *i0, int *i1)
i = (head + tail) / 2;
if (x == CELL_X0(index[i]))
break;
if (x < CELL_X0(index[i]))
tail = i+1;
else
else if (x < CELL_X0(index[i])) {
if (tail == i+1)
break;
tail = i+1;
} else {
if (head == i)
break;
head = i;
}
}
if (x != CELL_X0(index[i]))