mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04: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:
parent
248ca6e30b
commit
048b36324c
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user