Skip to content

Commit

Permalink
Fix compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumechereau committed Jul 1, 2024
1 parent 3e5cea4 commit a4f1731
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gesture3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ static int update_state(gesture3d_t *gest)
int gesture3d(const gesture3d_t *gest, int *nb, gesture3d_t gestures[])
{
int i;
gesture3d_t *other, *match;
gesture3d_t *other, *match = NULL;

// Search if we already have this gesture in the list.
for (i = 0; i < goxel.gesture3ds_count; i++) {
for (i = 0; i < *nb; i++) {
match = &gestures[i];
if ( match->callback == gest->callback &&
match->type == gest->type) {
Expand All @@ -141,6 +141,7 @@ int gesture3d(const gesture3d_t *gest, int *nb, gesture3d_t gestures[])
match = &gestures[(*nb)++];
memset(match, 0, sizeof(*match));
}
assert(match);

// Search if we already have a different active gesture.
// XXX: should depend on the type.
Expand Down

0 comments on commit a4f1731

Please sign in to comment.