mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-12 09:25:42 +00:00
audio: Check for unlikely failure case in WAV loaded.
I don't think this can fail at the moment, but if WaveCheckFormat goes out of sync with this switch statement at some point, this seems like a good failsafe.
This commit is contained in:
parent
3d65a2cefe
commit
7ee2459927
1 changed files with 2 additions and 0 deletions
|
|
@ -2058,6 +2058,8 @@ static int WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 *
|
|||
return SDL_SetError("Unexpected %u-bit PCM data format", (unsigned int)format->bitspersample);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return SDL_SetError("Unexpected data format");
|
||||
}
|
||||
|
||||
/* Report the end position back to the cleanup code. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue