diff options
Diffstat (limited to 'src/wrapped')
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 72de9c7d..cd95351f 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -695,9 +695,16 @@ EXPORT int my___printf_chk(x64emu_t *emu, int chk, void* fmt, void* b) PREPARE_VALIST; return vprintf((const char*)fmt, VARARGS); } +extern int box64_stdout_no_w; EXPORT int my_wprintf(x64emu_t *emu, void* fmt, void* b) { myStackAlignW(emu, (const char*)fmt, b, emu->scratch, R_EAX, 1); PREPARE_VALIST; + if(box64_stdout_no_w) { + wchar_t buff[2048]; + int ret = vswprintf(buff, 2047, fmt, VARARGS); + printf("%S", buff); + return ret; + } return vwprintf((const wchar_t*)fmt, VARARGS); } EXPORT int my___wprintf_chk(x64emu_t *emu, int chk, void* fmt, void* b) |