From 016a799e95d93fed5c46a8ea220f5a00babffc8b Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Sat, 24 Jan 2009 22:52:37 +0200 Subject: [PATCH] Fix use of uninitialized struct member. (caused crash) --- addnote.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addnote.cpp b/addnote.cpp index 961d36a..a5edef5 100644 --- a/addnote.cpp +++ b/addnote.cpp @@ -248,7 +248,7 @@ zyn_addnote_create( note_ptr->bypassr = (zyn_sample_type *)malloc(sizeof(zyn_sample_type) * SOUND_BUFFER_SIZE); note_ptr->voices_ptr = (struct addsynth_voice *)malloc(sizeof(struct addsynth_voice) * synth_ptr->voices_count); - for (voice_index = 0 ; voice_index < note_ptr->synth_ptr->voices_count ; voice_index++) + for (voice_index = 0 ; voice_index < synth_ptr->voices_count ; voice_index++) { // the extra points contains the first point note_ptr->voices_ptr[voice_index].OscilSmp = (zyn_sample_type *)malloc(sizeof(zyn_sample_type) * (OSCIL_SIZE + OSCIL_SMP_EXTRA_SAMPLES)); -- 2.11.4.GIT