From 1ea71c89a817e6165e9fe2f4a2a743338b68c366 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 21 Sep 2024 14:22:21 +0200 Subject: [BOX32] Fixed wrapping of __ctype_b, __ctype_tolower and __ctype_toupper --- src/wrapped32/wrappedlibc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit 1.4.1