diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-21 14:22:21 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-21 14:22:21 +0200 |
| commit | 1ea71c89a817e6165e9fe2f4a2a743338b68c366 (patch) | |
| tree | ecd3941bc7af9d4b832bbaec4ac1d11596e1050b | |
| parent | 856ffea797299e065b9510a19d9f9f0767b5b7aa (diff) | |
| download | box64-1ea71c89a817e6165e9fe2f4a2a743338b68c366.tar.gz box64-1ea71c89a817e6165e9fe2f4a2a743338b68c366.zip | |
[BOX32] Fixed wrapping of __ctype_b, __ctype_tolower and __ctype_toupper
| -rwxr-xr-x | src/wrapped32/wrappedlibc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c index c58037eb..d1c392e0 100755 --- a/src/wrapped32/wrappedlibc.c +++ b/src/wrapped32/wrappedlibc.c @@ -2488,12 +2488,12 @@ static void ctSetup() #else static void ctSetup() { - memcpy(my32_toupper, *__ctype_b_loc()-128*sizeof(short), 384*sizeof(short)); - my32___ctype_b = to_ptrv(&my32_ctype[128]); - memcpy(my32_toupper, *__ctype_toupper_loc()-128*sizeof(int), 384*sizeof(int)); - my32___ctype_toupper = to_ptrv(&my32_toupper[128]); - memcpy(my32_tolower, *__ctype_tolower_loc()-128*sizeof(int), 384*sizeof(int)); - my32___ctype_tolower = to_ptrv(&my32_tolower[128]); + memcpy(my32_ctype, &((*__ctype_b_loc())[-128]), 384*sizeof(short)); + my32___ctype_b = to_ptrv(my32_ctype+128); + memcpy(my32_toupper, &((*__ctype_toupper_loc())[-128]), 384*sizeof(int)); + my32___ctype_toupper = to_ptrv(my32_toupper+128); + memcpy(my32_tolower, &((*__ctype_tolower_loc())[-128]), 384*sizeof(int)); + my32___ctype_tolower = to_ptrv(my32_tolower+128); } #endif |