Fix errors when opening a decoder from a file.

This commit is contained in:
David Reid
2018-03-18 20:50:18 +10:00
parent fb527d1617
commit ebece8281a
+2 -2
View File
@@ -17490,12 +17490,12 @@ mal_result mal_decoder__preinit_file(const char* pFilePath, const mal_decoder_co
FILE* pFile; FILE* pFile;
#if defined(_MSC_VER) && _MSC_VER >= 1400 #if defined(_MSC_VER) && _MSC_VER >= 1400
if (fopen_s(&pFile, pFilePath, "rb") != 0) { if (fopen_s(&pFile, pFilePath, "rb") != 0) {
return MAL_FALSE; return MAL_ERROR;
} }
#else #else
pFile = fopen(pFilePath, "rb"); pFile = fopen(pFilePath, "rb");
if (pFile == NULL) { if (pFile == NULL) {
return MAL_FALSE; return MAL_ERROR;
} }
#endif #endif