shithub: mp3dec

Download patch

ref: e9df0760e94044caded36a55d70ab4152134adc5
parent: dd063794986a1e6a23b6dc4dcdf95014e6c3df06
parent: e4258fc1e8644d84267a44698c5be9882b3efc97
author: Lion <lieff@users.noreply.github.com>
date: Fri Nov 23 13:01:13 EST 2018

Merge pull request #47 from bog-dan-ro/master

Fix crosses initialization of 'long int size'

--- a/minimp3_ex.h
+++ b/minimp3_ex.h
@@ -310,10 +310,10 @@
     FILE *file = fopen(file_name, "rb");
     if (!file)
         return -1;
-
+    long size = -1;
     if (fseek(file, 0, SEEK_END))
         goto error;
-    long size = ftell(file);
+    size = ftell(file);
     if (size < 0)
         goto error;
     map_info->size = (size_t)size;