Fixing casts. This is why I need tests.

This commit is contained in:
Ben Vanik
2016-01-01 12:45:06 -08:00
parent 8770e6e6cf
commit c8b544ffd4
2 changed files with 7 additions and 7 deletions

View File

@@ -198,7 +198,7 @@ dword_result_t NtReadFile(dword_t file_handle, dword_t event_handle,
size_t bytes_read = 0;
result = file->Read(
buffer, buffer_length,
byte_offset_ptr ? static_cast<uint32_t>(*byte_offset_ptr) : -1,
byte_offset_ptr ? static_cast<uint64_t>(*byte_offset_ptr) : -1,
&bytes_read, apc_context);
if (io_status_block) {
io_status_block->status = result;
@@ -289,7 +289,7 @@ dword_result_t NtWriteFile(dword_t file_handle, dword_t event_handle,
size_t bytes_written = 0;
result = file->Write(
buffer, buffer_length,
byte_offset_ptr ? static_cast<uint32_t>(*byte_offset_ptr) : -1,
byte_offset_ptr ? static_cast<uint64_t>(*byte_offset_ptr) : -1,
&bytes_written, apc_context);
if (XSUCCEEDED(result)) {
info = (int32_t)bytes_written;