Commit e1a3abe9 authored by David Reid's avatar David Reid

Fix a bug with `ma_vfs_read()`.

This is not pre-initializing the variable that receives the number of
bytes read to 0 which can result in custom VFS implementations
returning an invalid value if they return early from an error or
whatnot.
parent fb9c18c7
...@@ -58510,7 +58510,7 @@ MA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t ...@@ -58510,7 +58510,7 @@ MA_API ma_result ma_vfs_read(ma_vfs* pVFS, ma_vfs_file file, void* pDst, size_t
{ {
ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS; ma_vfs_callbacks* pCallbacks = (ma_vfs_callbacks*)pVFS;
ma_result result; ma_result result;
size_t bytesRead; size_t bytesRead = 0;
if (pBytesRead != NULL) { if (pBytesRead != NULL) {
*pBytesRead = 0; *pBytesRead = 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment