From 46eaf1fa5ee043fd074cc4ad0311bed1ad11a04c Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 19 Aug 2023 09:22:39 +1000 Subject: [PATCH] Fix a bug where ma_decoder_init_file can incorrectly return successful. --- miniaudio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index 9ec3c844..a4e0a30c 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -64826,7 +64826,7 @@ MA_API ma_result ma_decoder_init_file(const char* pFilePath, const ma_decoder_co /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */ result = ma_decoder_init_vfs(NULL, pFilePath, pConfig, pDecoder); if (result != MA_SUCCESS) { - return MA_SUCCESS; + return result; } } @@ -64976,7 +64976,7 @@ MA_API ma_result ma_decoder_init_file_w(const wchar_t* pFilePath, const ma_decod /* Probably no implementation for loading from a file path. Use miniaudio's file IO instead. */ result = ma_decoder_init_vfs_w(NULL, pFilePath, pConfig, pDecoder); if (result != MA_SUCCESS) { - return MA_SUCCESS; + return result; } }