Testing travis xenia powerpc testing
This commit is contained in:
@@ -79,7 +79,7 @@ dword_result_t NtAllocateVirtualMemory(lpdword_t base_addr_ptr,
|
||||
// it's simple today we could extend it to do better things in the future.
|
||||
|
||||
// Must request a size.
|
||||
if (!base_addr_ptr) {
|
||||
if (!base_addr_ptr || !region_size_ptr) {
|
||||
return X_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
// Check allocation type.
|
||||
@@ -106,8 +106,8 @@ dword_result_t NtAllocateVirtualMemory(lpdword_t base_addr_ptr,
|
||||
uint32_t adjusted_base = *base_addr_ptr - (*base_addr_ptr % page_size);
|
||||
// For some reason, some games pass in negative sizes.
|
||||
uint32_t adjusted_size = int32_t(*region_size_ptr) < 0
|
||||
? -int32_t(*region_size_ptr)
|
||||
: *region_size_ptr;
|
||||
? -int32_t(region_size_ptr.value())
|
||||
: region_size_ptr.value();
|
||||
adjusted_size = xe::round_up(adjusted_size, page_size);
|
||||
|
||||
// Allocate.
|
||||
|
||||
@@ -238,7 +238,7 @@ dword_result_t RtlMultiByteToUnicodeN(lpword_t destination_ptr,
|
||||
pointer_t<uint8_t> source_ptr,
|
||||
dword_t source_len) {
|
||||
uint32_t copy_len = destination_len >> 1;
|
||||
copy_len = copy_len < source_len ? copy_len : source_len;
|
||||
copy_len = copy_len < source_len ? copy_len : source_len.value();
|
||||
|
||||
// TODO(benvanik): maybe use MultiByteToUnicode on Win32? would require
|
||||
// swapping.
|
||||
@@ -262,7 +262,7 @@ dword_result_t RtlUnicodeToMultiByteN(pointer_t<uint8_t> destination_ptr,
|
||||
lpdword_t written_ptr,
|
||||
lpword_t source_ptr, dword_t source_len) {
|
||||
uint32_t copy_len = source_len >> 1;
|
||||
copy_len = copy_len < destination_len ? copy_len : destination_len;
|
||||
copy_len = copy_len < destination_len ? copy_len : destination_len.value();
|
||||
|
||||
// TODO(benvanik): maybe use UnicodeToMultiByte on Win32?
|
||||
for (uint32_t i = 0; i < copy_len; i++) {
|
||||
|
||||
Reference in New Issue
Block a user