about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-02-14 10:58:58 +0100
committerptitSeb <sebastien.chev@gmail.com>2023-02-14 10:58:58 +0100
commit69eb3090310dd8e3740e41ba184dc7cf6efbf4c9 (patch)
treeed2bb0c8937f64a14a30449a152e5139cb0d4c20 /src
parente7f0c8cbe1963ab7b223f23729a282a7f95ee14f (diff)
downloadbox64-69eb3090310dd8e3740e41ba184dc7cf6efbf4c9.tar.gz
box64-69eb3090310dd8e3740e41ba184dc7cf6efbf4c9.zip
[DYNAREC] Fixed an issue with custom memory alocator
Diffstat (limited to 'src')
-rw-r--r--src/custommem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/custommem.c b/src/custommem.c
index a88674fd..9f5422a9 100644
--- a/src/custommem.c
+++ b/src/custommem.c
@@ -433,7 +433,7 @@ mmapchunk_t* addChunk(size_t mmapsize) {
         mmaplist = (mmaplist_t*)box_calloc(1, sizeof(mmaplist_t));
     mmaplist_t* head = mmaplist;
     size_t i = mmapsize;
-    while(i) {
+    while(1) {
         if(i>=NCHUNK) {
             i-=NCHUNK;
             if(!head->next) {
@@ -443,7 +443,6 @@ mmapchunk_t* addChunk(size_t mmapsize) {
         } else
             return &head->chunks[i];
     }
-    return NULL;    // never reached
 }
 
 uintptr_t FindFreeDynarecMap(dynablock_t* db, size_t size)