Fixing casts. This is why I need tests.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user