Skip to content

Commit c663b6e

Browse files
committed
Don't leave garbage in output parameters
1 parent cd15893 commit c663b6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/audio/SDL_audiocvt.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,12 @@ bool SDL_UnlockAudioStream(SDL_AudioStream *stream)
531531
bool SDL_GetAudioStreamFormat(SDL_AudioStream *stream, SDL_AudioSpec *src_spec, SDL_AudioSpec *dst_spec)
532532
{
533533
if (!stream) {
534+
if (src_spec) {
535+
SDL_zerop(src_spec);
536+
}
537+
if (dst_spec) {
538+
SDL_zerop(dst_spec);
539+
}
534540
return SDL_InvalidParamError("stream");
535541
}
536542

0 commit comments

Comments
 (0)