Commit 62a7c6a8 authored by David Reid's avatar David Reid

Check the result of ReadFile() to silence some static analysis warnings

parent e67953d6
......@@ -42345,9 +42345,13 @@ static ma_result ma_default_vfs_read__win32(ma_vfs* pVFS, ma_vfs_file file, void
}
readResult = ReadFile((HANDLE)file, ma_offset_ptr(pDst, totalBytesRead), bytesToRead, &bytesRead, NULL);
if (readResult == 1 && bytesRead == 0) {
break; /* EOF */
}
totalBytesRead += bytesRead;
if (bytesRead < bytesToRead || (readResult == 1 && bytesRead == 0)) {
if (bytesRead < bytesToRead) {
break; /* EOF */
}
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