about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibc.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-09-12 16:35:35 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-09-12 16:35:35 +0200
commitd047dcb9836e5224847963178817908f025bda88 (patch)
tree49c6e981d4df0aab6794fa860508c1da1fa7a130 /src/wrapped/wrappedlibc.c
parent0fc310f1c4f0c84df744b725b407f59325794462 (diff)
downloadbox64-d047dcb9836e5224847963178817908f025bda88.tar.gz
box64-d047dcb9836e5224847963178817908f025bda88.zip
Attempt at fixing wrapped __vfwprintf_chk (for #404)
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 12bea956..effef36c 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -654,7 +654,15 @@ EXPORT int my_vfwprintf(x64emu_t *emu, void* F, void* fmt, x64_va_list_t  b) {
     #endif
     return vfwprintf(F, fmt, VARARGS);
 }
-EXPORT int my___vfwprintf_chk(x64emu_t *emu, void* F, void* fmt, x64_va_list_t b) __attribute__((alias("my_vprintf")));
+EXPORT int my___vfwprintf_chk(x64emu_t *emu, void* F, int flag, void* fmt, x64_va_list_t b)  {
+    #ifdef CONVERT_VALIST
+    CONVERT_VALIST(b);
+    #else
+    myStackAlignWValist(emu, (const char*)fmt, emu->scratch, b);
+    PREPARE_VALIST;
+    #endif
+    return vfwprintf(F, fmt, VARARGS);
+}
 
 #if 0
 EXPORT int my_vwprintf(x64emu_t *emu, void* fmt, void* b) {