about summary refs log tree commit diff stats
path: root/src/wrapped
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrapped')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c17
-rwxr-xr-xsrc/wrapped/wrappedlibc_private.h2
2 files changed, 6 insertions, 13 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c
index 3ba746c1..15e5204c 100755
--- a/src/wrapped/wrappedlibc.c
+++ b/src/wrapped/wrappedlibc.c
@@ -857,21 +857,14 @@ EXPORT void my_vwarn(x64emu_t* emu, void* fmt, void* b) {
     ((vFpp_t)f)(fmt, (uint32_t*)b);
     #endif
 }
-
-EXPORT int my___swprintf_chk(x64emu_t* emu, void* s, uint32_t n, int32_t flag, uint32_t slen, void* fmt, void * b)
+#endif
+EXPORT int my___swprintf_chk(x64emu_t* emu, void* s, size_t n, int32_t flag, size_t slen, void* fmt, uint64_t* b)
 {
-    #ifndef NOALIGN
-    myStackAlignW((const char*)fmt, b, emu->scratch);
+    myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 5);
     PREPARE_VALIST;
-    void* f = vswprintf;
-    int r = ((iFpupp_t)f)(s, n, fmt, VARARGS);
-    return r;
-    #else
-    void* f = vswprintf;
-    int r = ((iFpupp_t)f)(s, n, fmt, b);
-    return r;
-    #endif
+    return vswprintf(s, n, (const wchar_t*)fmt, VARARGS);
 }
+#if 0
 EXPORT int my_swprintf(x64emu_t* emu, void* s, uint32_t n, void* fmt, void *b)
 {
     #ifndef NOALIGN
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index a5f44108..9e8f9a8e 100755
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -1907,7 +1907,7 @@ GOM(swapcontext, iFEpp) //Weak
 //GOW(swapoff, 
 //GOW(swapon, 
 //GO(swprintf, 
-//GO(__swprintf_chk, 
+GOM(__swprintf_chk, iFEpLiLpV)
 //GO(swscanf, 
 //GOW(symlink, 
 //GO(symlinkat,