about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-09-21 14:22:21 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-09-21 14:22:21 +0200
commit1ea71c89a817e6165e9fe2f4a2a743338b68c366 (patch)
treeecd3941bc7af9d4b832bbaec4ac1d11596e1050b
parent856ffea797299e065b9510a19d9f9f0767b5b7aa (diff)
downloadbox64-1ea71c89a817e6165e9fe2f4a2a743338b68c366.tar.gz
box64-1ea71c89a817e6165e9fe2f4a2a743338b68c366.zip
[BOX32] Fixed wrapping of __ctype_b, __ctype_tolower and __ctype_toupper
-rwxr-xr-xsrc/wrapped32/wrappedlibc.c12
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