From 048b36324ccfd957a716cf4154d9b1694ad3cf28 Mon Sep 17 00:00:00 2001 From: vsariola <5684185+vsariola@users.noreply.github.com> Date: Sun, 28 Feb 2021 15:40:06 +0200 Subject: [PATCH] fix(tests): test_render_samples_api forgot to initialize struct Sometimes crashed, if the unitialized struct happened to contain garbage. --- tests/test_render_samples_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_render_samples_api.c b/tests/test_render_samples_api.c index 4745744..d1db92f 100644 --- a/tests/test_render_samples_api.c +++ b/tests/test_render_samples_api.c @@ -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;