Skip to content

Commit

Permalink
playsound: sound_desired must be zeroed to not feed garbage to library.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Mar 20, 2021
1 parent 8e87c85 commit f736201
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/playsound.c
Expand Up @@ -709,9 +709,11 @@ int main(int argc, char **argv)
assert(screen != NULL);
#endif

memset(&sound_desired, '\0', sizeof (Sound_AudioInfo));

for (i = 1; i < argc; i++)
{
char *filename = NULL;
const char *filename = NULL;

/* set variables back to defaults for next file... */
if (new_sample)
Expand Down

0 comments on commit f736201

Please sign in to comment.