diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 08:56:12 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-26 08:56:12 +0100 |
| commit | 4f5ad4b3acbdf2ce29c68ad0c8a6dd908175ea20 (patch) | |
| tree | 3065669cf85b53fdfc7f515dfee82c06587a3e06 /src/wrapped/wrappedlibc.c | |
| parent | 104d51df8c33f83d787ffa8a9b8fe16acf3bfcdc (diff) | |
| download | box64-4f5ad4b3acbdf2ce29c68ad0c8a6dd908175ea20.tar.gz box64-4f5ad4b3acbdf2ce29c68ad0c8a6dd908175ea20.zip | |
Added wrapped __swprintf_chk function
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 17 |
1 files changed, 5 insertions, 12 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 |