core/fs: Use DWORD instead of uint32_t in fs_read and fs_write;

Fixes a warning.
This commit is contained in:
bjorn 2020-04-30 16:53:10 -06:00
parent ce2a28360d
commit b035f8e4dc
1 changed files with 2 additions and 2 deletions

View File

@ -41,14 +41,14 @@ bool fs_close(fs_handle file) {
}
bool fs_read(fs_handle file, void* buffer, size_t* bytes) {
uint32_t bytes32 = *bytes > UINT32_MAX ? UINT32_MAX : (uint32_t) *bytes;
DWORD bytes32 = *bytes > UINT32_MAX ? UINT32_MAX : (DWORD) *bytes;
bool success = ReadFile(file.handle, buffer, bytes32, &bytes32, NULL);
*bytes = bytes32;
return success;
}
bool fs_write(fs_handle file, const void* buffer, size_t* bytes) {
uint32_t bytes32 = *bytes > UINT32_MAX ? UINT32_MAX : (uint32_t) *bytes;
DWORD bytes32 = *bytes > UINT32_MAX ? UINT32_MAX : (DWORD) *bytes;
bool success = WriteFile(file.handle, buffer, bytes32, &bytes32, NULL);
*bytes = bytes32;
return success;