diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-04-02 14:27:11 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-04-02 14:27:11 +0200 |
| commit | f781537adbe4461a72ac61bf24ace40b63c0d1c7 (patch) | |
| tree | 72c69152900f55a9116d6e971609b895113cba23 /src/wrapped | |
| parent | c2c65f46cb4af0b4b7e05fc44d8f897f2b14ccdc (diff) | |
| download | box64-f781537adbe4461a72ac61bf24ace40b63c0d1c7.tar.gz box64-f781537adbe4461a72ac61bf24ace40b63c0d1c7.zip | |
Added wrapped swscanf
Diffstat (limited to 'src/wrapped')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 8 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index dbd9eb6b..2490dcb0 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -796,6 +796,14 @@ EXPORT int my_vswprintf(x64emu_t* emu, void* buff, size_t s, void * fmt, x64_va_ } EXPORT int my___vswprintf(x64emu_t* emu, void* buff, size_t s, void * fmt, x64_va_list_t b) __attribute__((alias("my_vswprintf"))); EXPORT int my___vswprintf_chk(x64emu_t* emu, void* buff, size_t s, void * fmt, x64_va_list_t b) __attribute__((alias("my_vswprintf"))); + +EXPORT int my_swscanf(x64emu_t* emu, void* stream, void* fmt, uint64_t* b) +{ + myStackAlignScanfW(emu, (const char*)fmt, b, emu->scratch, 2); + PREPARE_VALIST; + + return vswscanf(stream, fmt, VARARGS); +} #if 0 EXPORT void my_verr(x64emu_t* emu, int eval, void* fmt, void* b) { #ifndef NOALIGN diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index 95d825fd..a7707b3f 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1909,7 +1909,7 @@ GOM(swapcontext, iFEpp) //Weak //GOW(swapon, GOM(swprintf, iFEpLpV) GOM(__swprintf_chk, iFEpLiLpV) -//GO(swscanf, +GOM(swscanf, iFEppV) GOW(symlink, iFpp) GO(symlinkat, iFpip) GO(sync, vFv) |