diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-09-12 16:35:35 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-09-12 16:35:35 +0200 |
| commit | d047dcb9836e5224847963178817908f025bda88 (patch) | |
| tree | 49c6e981d4df0aab6794fa860508c1da1fa7a130 /src/wrapped/wrappedlibc.c | |
| parent | 0fc310f1c4f0c84df744b725b407f59325794462 (diff) | |
| download | box64-d047dcb9836e5224847963178817908f025bda88.tar.gz box64-d047dcb9836e5224847963178817908f025bda88.zip | |
Attempt at fixing wrapped __vfwprintf_chk (for #404)
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 10 |
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) { |