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 f0a4e4f commit b09f907
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/playsound.c
Expand Up @@ -783,9 +783,11 @@ int main(int argc, char **argv)
SDL_assert(screen != NULL);
#endif

SDL_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 b09f907

Please sign in to comment.