Skip to content

Commit

Permalink
Fixed bug 4842 - Redundant condition in MS_ADPCM_Decode and IMA_ADPCM…
Browse files Browse the repository at this point in the history
…_Decode

(Thanks!)
  • Loading branch information
1bsyl committed Oct 23, 2019
1 parent c9d0e2a commit ed469fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/audio/SDL_wave.c
Expand Up @@ -717,7 +717,7 @@ MS_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
result = MS_ADPCM_DecodeBlockData(&state);
if (result == -1) {
/* Unexpected end. Stop decoding and return partial data if necessary. */
if (file->trunchint == TruncVeryStrict || file->trunchint == TruncVeryStrict) {
if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
SDL_free(state.output.data);
return SDL_SetError("Truncated data chunk");
} else if (file->trunchint != TruncDropFrame) {
Expand Down Expand Up @@ -1114,7 +1114,7 @@ IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)

if (result == -1) {
/* Unexpected end. Stop decoding and return partial data if necessary. */
if (file->trunchint == TruncVeryStrict || file->trunchint == TruncVeryStrict) {
if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
SDL_free(state.output.data);
SDL_free(cstate);
return SDL_SetError("Truncated data chunk");
Expand Down

0 comments on commit ed469fa

Please sign in to comment.