diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-06-11 10:29:46 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-06-11 10:29:46 +0200 |
| commit | 72927195fdea77040513c284a91809b00a0cadd9 (patch) | |
| tree | 8a0cc5d8cdbb1fb944c73db1f9c15d9c20b27799 /src/wrapped/wrappedlibc.c | |
| parent | e29326d8d048b459b58272a0f88a776852dfe519 (diff) | |
| download | box64-72927195fdea77040513c284a91809b00a0cadd9.tar.gz box64-72927195fdea77040513c284a91809b00a0cadd9.zip | |
Added wrapped __wprintf_chk and wprintf (for #311)
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index f066b917..ae0c954f 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -557,6 +557,18 @@ EXPORT int my___printf_chk(x64emu_t *emu, int chk, void* fmt, void* b) PREPARE_VALIST; return vprintf((const char*)fmt, VARARGS); } +EXPORT int my_wprintf(x64emu_t *emu, void* fmt, void* b) { + myStackAlignW(emu, (const char*)fmt, b, emu->scratch, R_EAX, 1); + PREPARE_VALIST; + return vwprintf((const wchar_t*)fmt, VARARGS); +} +EXPORT int my___wprintf_chk(x64emu_t *emu, int chk, void* fmt, void* b) +{ + (void)chk; + myStackAlignW(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); + PREPARE_VALIST; + return vwprintf((const wchar_t*)fmt, VARARGS); +} EXPORT int my_vprintf(x64emu_t *emu, void* fmt, x64_va_list_t b) { (void)emu; |