mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-17 19:48:51 +00:00
SDL_ConvertAudioSamples: Make sure we got enough data
This commit is contained in:
parent
edaab8ad9f
commit
5e985b72dc
1 changed files with 1 additions and 1 deletions
|
|
@ -1102,7 +1102,7 @@ int SDL_ConvertAudioSamples(const SDL_AudioSpec *src_spec, const Uint8 *src_data
|
|||
if (dstlen >= 0) {
|
||||
dst = (Uint8 *)SDL_malloc(dstlen);
|
||||
if (dst) {
|
||||
retval = (SDL_GetAudioStreamData(stream, dst, dstlen) >= 0) ? 0 : -1;
|
||||
retval = (SDL_GetAudioStreamData(stream, dst, dstlen) == dstlen) ? 0 : -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue