diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index 9c40876..f86ed0b 100644 --- a/src/main.c +++ b/src/main.c @@ -535,8 +535,10 @@ void main_loop(void) { size_t const start = touch.allocated; touch.allocated = i + 1; touch.positions = realloc(touch.positions, sizeof (struct touch_vec) * touch.allocated); - for (size_t index = start; index < i - 1; index++) { - touch.positions[index].active = 0; + if (i) { // hack for 0 - 1 = absurd-high number; all of RAM gets wiped + for (size_t index = start; index < i - 1; index++) { + touch.positions[index].active = 0; + } } } touch.positions[i].active = 1; |