Skip to content

Commit

Permalink
Fixed crash in [vectral] when resizing to a size larger than the init…
Browse files Browse the repository at this point in the history
…ial size
  • Loading branch information
timothyschoen authored Sep 2, 2024
1 parent 81835a3 commit 3b945c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cyclone_objects/binaries/audio/vectral.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ static void vectral_free(t_vectral *x){
}

static void vectral_size(t_vectral *x, t_floatarg f){
int last_bufsize = x->x_bufsize;
x->x_bufsize = (int)f < 64 ? 64 : (int)f;
x->x_buffer = resizebytes(x->x_buffer, last_bufsize * sizeof(*x->x_buffer), x->x_bufsize * sizeof(*x->x_buffer));
}

static void vectral_clear(t_vectral *x){
Expand Down

0 comments on commit 3b945c0

Please sign in to comment.