Skip to content

Commit 9b91843

Browse files
committed
Don't leave garbage in output parameters
1 parent b4a49fb commit 9b91843

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/SDL_mixer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,9 @@ SDL_PropertiesID MIX_GetMixerProperties(MIX_Mixer *mixer)
897897
bool MIX_GetMixerFormat(MIX_Mixer *mixer, SDL_AudioSpec *spec)
898898
{
899899
if (!CheckMixerParam(mixer)) {
900+
if (spec) {
901+
SDL_zerop(spec);
902+
}
900903
return false;
901904
} else if (!spec) {
902905
return SDL_InvalidParamError("spec");

0 commit comments

Comments
 (0)