SDL_mixer: Fixed loading WAV files as music

From 14f1eb25603cc75624e9d2c92a5b0eebcf93a015 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 9 Aug 2023 14:49:35 -0700
Subject: [PATCH] Fixed loading WAV files as music

---
 src/codecs/music_wav.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/codecs/music_wav.c b/src/codecs/music_wav.c
index e04d7fe2..1889bb32 100644
--- a/src/codecs/music_wav.c
+++ b/src/codecs/music_wav.c
@@ -1654,6 +1654,9 @@ static SDL_bool LoadWAVMusic(WAV_Music *wave)
     for (; ;) {
         if (!SDL_ReadU32LE(src, &chunk_type) ||
             !SDL_ReadU32LE(src, &chunk_length)) {
+            if (src->status == SDL_RWOPS_STATUS_EOF) {
+                break;
+            }
             return SDL_FALSE;
         }