mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
Don't leave garbage in output parameters
This commit is contained in:
@@ -531,6 +531,12 @@ bool SDL_UnlockAudioStream(SDL_AudioStream *stream)
|
||||
bool SDL_GetAudioStreamFormat(SDL_AudioStream *stream, SDL_AudioSpec *src_spec, SDL_AudioSpec *dst_spec)
|
||||
{
|
||||
if (!stream) {
|
||||
if (src_spec) {
|
||||
SDL_zerop(src_spec);
|
||||
}
|
||||
if (dst_spec) {
|
||||
SDL_zerop(dst_spec);
|
||||
}
|
||||
return SDL_InvalidParamError("stream");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user