mirror of
https://github.com/vsariola/sointu.git
synced 2025-11-06 18:04:26 -05:00
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:
@ -27,6 +27,7 @@ int main(int argc, char* argv[]) {
|
|||||||
int retval;
|
int retval;
|
||||||
// initialize Synth
|
// initialize Synth
|
||||||
synth = (Synth*)malloc(sizeof(Synth));
|
synth = (Synth*)malloc(sizeof(Synth));
|
||||||
|
memset(synth, 0, sizeof(Synth));
|
||||||
memcpy(synth->Commands, commands, sizeof(commands));
|
memcpy(synth->Commands, commands, sizeof(commands));
|
||||||
memcpy(synth->Values, values, sizeof(values));
|
memcpy(synth->Values, values, sizeof(values));
|
||||||
synth->NumVoices = 1;
|
synth->NumVoices = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user