mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 00:34:03 +02:00
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:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user