foxygit / doom Log in
commit ded7e89d0f5ee328b88c90000dcf3e3e2cba7b88
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Sat Mar 17 23:47:38 2018 -0400
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Sat Mar 17 23:47:38 2018 -0400

    music: Fix bug with loop metadata tags on Windows.

    The .ogg / .flac music files need to be opened in binary mode, not
    in text mode, otherwise these won't be read properly on Windows. This
    fixes #982.
---
 src/i_sdlmusic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/i_sdlmusic.c b/src/i_sdlmusic.c
index 412fbf9d..04f5e616 100644
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -381,7 +381,7 @@ static void ReadLoopPoints(char *filename, file_metadata_t *metadata)
     metadata->start_time = 0;
     metadata->end_time = -1;

-    fs = fopen(filename, "r");
+    fs = fopen(filename, "rb");

     if (fs == NULL)
     {