diff options
author | zlago | 2024-12-26 00:07:12 +0100 |
---|---|---|
committer | zlago | 2024-12-26 00:07:12 +0100 |
commit | 93ccfeeb9032eec91e0a4e5053f6646a5c73fe2d (patch) | |
tree | 1dc3fe57f13ea95e16d636354090fffeb7c6c24a /src/main.c | |
parent | f7e4de7c45ed848312690ce6cfb62ae562e8347c (diff) |
bugfixes
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; |