From 2f9f6184348966d3ef4332e64dbb9fba0a66076e Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 19 Apr 2021 18:46:43 +1000 Subject: [PATCH] Fix a bug in ma_encoder_init_file_w(). Public issue https://github.com/mackron/miniaudio/issues/297 --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index dc8f08d8..3996ba62 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -48134,7 +48134,7 @@ MA_API ma_result ma_encoder_init_file_w(const wchar_t* pFilePath, const ma_encod /* Now open the file. If this fails we don't need to uninitialize the encoder. */ result = ma_wfopen(&pFile, pFilePath, L"wb", &pEncoder->config.allocationCallbacks); - if (pFile != NULL) { + if (pFile == NULL) { return result; }