about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-06-18 18:34:49 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-06-18 18:34:49 +0200
commitc2dd6a0c6a2aee17e9f9f07f8a2a24e2efbbac39 (patch)
treeacda1427152bab48398db0a87a9fa6213a60d0e5 /src
parentf300e76c9bc7d7ee993d6f5c8e6c6112e3db7147 (diff)
downloadbox64-c2dd6a0c6a2aee17e9f9f07f8a2a24e2efbbac39.tar.gz
box64-c2dd6a0c6a2aee17e9f9f07f8a2a24e2efbbac39.zip
Small fixes to the my_backtrace (it doesn't seems to be working anyway)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index de61339c..94d7d761 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -2336,7 +2336,7 @@ EXPORT int my_backtrace(x64emu_t* emu, void** buffer, int size)
     }
     int idx=0;
     while(idx<size) {
-        if(!fp || (fp>=stack_end) || (fp<=stack_start))
+        if(!fp || (fp+sizeof(void*)>=stack_end) || (fp<=stack_start))
             return idx;
         buffer[idx] = (void*)fp[1];
         fp = (uintptr_t*)fp[0];