diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-12-14 19:43:20 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-12-14 19:43:20 +0100 |
| commit | 6a5d8313312ca254b7382019dc99912cabc5dafd (patch) | |
| tree | 1dc766bf24382ff707030bbe1862814f4329d078 /src/box32.c | |
| parent | 2164c564f26a0c144b3ef2f0d1abd790714a59e1 (diff) | |
| download | box64-6a5d8313312ca254b7382019dc99912cabc5dafd.tar.gz box64-6a5d8313312ca254b7382019dc99912cabc5dafd.zip | |
[BOX32][WRAPPER] Fixes and improves libc wrapping
Diffstat (limited to 'src/box32.c')
| -rw-r--r-- | src/box32.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/box32.c b/src/box32.c index a4c1a1b4..7ef84fbf 100644 --- a/src/box32.c +++ b/src/box32.c @@ -147,11 +147,11 @@ ulong_t to_hash_d(uintptr_t p) { } typedef struct struct_locale_s { - void* p0[13]; + void* p0[13]; // struct __locale_data * void* p1; //const unsigned short int *__ctype_b; void* p2; //const int *__ctype_tolower; void* p3; //const int *__ctype_toupper; - void* p4[13]; + void* p4[13]; //const char* } struct_locale_t; // not a real structure #define LOCALE_SIGN 0x54abcd845412LL @@ -180,7 +180,7 @@ void to_struct_locale(ptr_t d, const struct_locale_t *src) { dest->p0[i] = to_hashv(src->p0[i]); } for(int i=0; i<13; ++i) { - dest->p4[i] = to_hashv(src->p4[i]); + dest->p4[i] = to_cstring(src->p4[i]); } // copy the 3 ctype int (1st is short int, but int will do) memcpy(dest->type_b, src->p1-128*sizeof(short), 384*sizeof(short)); @@ -194,9 +194,9 @@ void free_struct_locale(const struct_locale_t *src) { for(int i=0; i<13; ++i) { to_hash_d((uintptr_t)src->p0[i]); } - for(int i=0; i<13; ++i) { + /*for(int i=0; i<13; ++i) { to_hash_d((uintptr_t)src->p4[i]); - } + }*/ } // Convert from locale key to original 64bits value |