foxygit / doom Log in
commit a0298b951abc1468616fed1f248ae83b5bb50550
Author:     alexey.lysiuk <alexey.lysiuk@gmail.com>
AuthorDate: Sun May 11 15:49:28 2014 +0300
Commit:     alexey.lysiuk <alexey.lysiuk@gmail.com>
CommitDate: Sun May 11 15:49:28 2014 +0300

    Fix compilation with MSVC2008
---
 src/i_sdlmusic.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/i_sdlmusic.c b/src/i_sdlmusic.c
index e7f0aacb..cf4a6b8b 100644
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -275,6 +275,8 @@ static void ParseFlacFile(file_metadata_t *metadata, FILE *fs)

     for (;;)
     {
+        long pos = -1;
+
         // Read METADATA_BLOCK_HEADER:
         if (fread(header, 4, 1, fs) < 1)
         {
@@ -285,7 +287,7 @@ static void ParseFlacFile(file_metadata_t *metadata, FILE *fs)
         last_block = (header[0] & 0x80) != 0;
         block_len = (header[1] << 16) | (header[2] << 8) | header[3];

-        long pos = ftell(fs);
+        pos = ftell(fs);
         if (pos < 0)
         {
             return;