[Kernel/Memory] Resolved bug introduced in last commit
This commit is contained in:
parent
0d71596200
commit
761fcccc40
|
@ -101,7 +101,7 @@ dword_result_t NtAllocateVirtualMemory(lpdword_t base_addr_ptr,
|
|||
if (*base_addr_ptr != 0) {
|
||||
// ignore specified page size when base address is specified.
|
||||
auto heap = kernel_memory()->LookupHeap(*base_addr_ptr);
|
||||
if (heap->page_size() == 0x1000 && !*region_size_ptr) {
|
||||
if (heap->page_size() != 0x1000 && !*region_size_ptr) {
|
||||
return X_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ dword_result_t NtProtectVirtualMemory(lpdword_t base_addr_ptr,
|
|||
}
|
||||
|
||||
auto heap = kernel_memory()->LookupHeap(*base_addr_ptr);
|
||||
if (heap->page_size() == 0x1000 && !*region_size_ptr) {
|
||||
if (heap->page_size() != 0x1000 && !*region_size_ptr) {
|
||||
return X_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ dword_result_t NtFreeVirtualMemory(lpdword_t base_addr_ptr,
|
|||
}
|
||||
|
||||
auto heap = kernel_state()->memory()->LookupHeap(base_addr_value);
|
||||
if (heap->page_size() == 0x1000 && !*region_size_ptr) {
|
||||
if (heap->page_size() != 0x1000 && !*region_size_ptr) {
|
||||
return X_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue