fix(tests): test_render_samples_api forgot to initialize struct

Sometimes crashed, if the unitialized struct happened to contain garbage.
This commit is contained in:
vsariola 2021-02-28 15:40:06 +02:00
parent 248ca6e30b
commit 048b36324c

View File

@ -27,6 +27,7 @@ int main(int argc, char* argv[]) {
int retval;
// initialize Synth
synth = (Synth*)malloc(sizeof(Synth));
memset(synth, 0, sizeof(Synth));
memcpy(synth->Commands, commands, sizeof(commands));
memcpy(synth->Values, values, sizeof(values));
synth->NumVoices = 1;