summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2015-08-26 11:38:26 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2015-08-27 02:29:05 +0200
commit12390eb155c055884f183cc547473a1dd92ff667 (patch)
tree4029327dd7e7bb2f4cf1243a3950a49168ceb69b
parentCore: Improve APT Shared Font hack (diff)
downloadyuzu-12390eb155c055884f183cc547473a1dd92ff667.tar
yuzu-12390eb155c055884f183cc547473a1dd92ff667.tar.gz
yuzu-12390eb155c055884f183cc547473a1dd92ff667.tar.bz2
yuzu-12390eb155c055884f183cc547473a1dd92ff667.tar.lz
yuzu-12390eb155c055884f183cc547473a1dd92ff667.tar.xz
yuzu-12390eb155c055884f183cc547473a1dd92ff667.tar.zst
yuzu-12390eb155c055884f183cc547473a1dd92ff667.zip
-rw-r--r--src/core/hle/kernel/process.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index 124047a53..6279a4bf8 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -174,6 +174,10 @@ ResultCode Process::HeapFree(VAddr target, u32 size) {
return ERR_INVALID_ADDRESS;
}
+ if (size == 0) {
+ return RESULT_SUCCESS;
+ }
+
ResultCode result = vm_manager.UnmapRange(target, size);
if (result.IsError()) return result;
@@ -226,6 +230,10 @@ ResultCode Process::LinearFree(VAddr target, u32 size) {
return ERR_INVALID_ADDRESS;
}
+ if (size == 0) {
+ return RESULT_SUCCESS;
+ }
+
VAddr heap_end = GetLinearHeapBase() + (u32)linheap_memory->size();
if (target + size > heap_end) {
return ERR_INVALID_ADDRESS_STATE;