about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-04-19 17:49:09 +0000
committerptitSeb <sebastien.chev@gmail.com>2023-04-19 20:37:20 +0000
commit5d92a3a89119e8f52886b1d7751755e1b8b3ddf3 (patch)
tree5118ca029a6cc18aa47107817e33de32065568ab /src/emu
parent70787b0a6d7b481e41bb498ca4beac9572bd798f (diff)
downloadbox64-5d92a3a89119e8f52886b1d7751755e1b8b3ddf3.tar.gz
box64-5d92a3a89119e8f52886b1d7751755e1b8b3ddf3.zip
Some sligth improvment to __vsnprintf_chk and vfprintf
Diffstat (limited to 'src/emu')
-rwxr-xr-xsrc/emu/x64int3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c
index 61bf3b43..9d6f474b 100755
--- a/src/emu/x64int3.c
+++ b/src/emu/x64int3.c
@@ -202,14 +202,14 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr)
                     pu64 = (uint64_t*)R_RDI;
                     post = 3;
                     snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu, %d, %zu, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI, R_EDX, R_RCX, (tmp)?tmp:"(nil)", (void*)(R_R9));
-                } else if (!strcmp(s, "snprintf")) {
+                } else if (strstr(s, "snprintf")==s) {
                     tmp = (char*)(R_RDX);
                     pu64 = (uint64_t*)R_RDI;
                     post = 3;
                     snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI, (tmp)?tmp:"(nil)", (void*)(R_RCX));
-                } else if (strstr(s, "vfprintf")) {
+                } else if (strstr(s, "vfprintf")==s) {
                     tmp = (char*)(R_RSI);
-                    snprintf(buff, 256, "%04d|%p: Calling %s(%p, \"%s\", ...", tid, *(void**)(R_RSP), s, (void*)R_RDI, (tmp)?tmp:"(nil)");
+                    snprintf(buff, 256, "%04d|%p: Calling %s(%p, \"%s\", ...)", tid, *(void**)(R_RSP), s, (void*)R_RDI, (tmp)?tmp:"(nil)");
                 } else if (!strcmp(s, "getcwd")) {
                     post = 2;
                     snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu)", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI);