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.
This commit is contained in:
David Reid
2023-03-23 10:43:56 +10:00
parent fb9c18c705
commit e1a3abe9e7
+1 -1
View File
@@ -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_result result;
size_t bytesRead;
size_t bytesRead = 0;
if (pBytesRead != NULL) {
*pBytesRead = 0;