about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-08-29 16:32:14 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-08-29 16:32:14 +0200
commitb02302a5cfb248eb333b01747516e76959e8c68d (patch)
tree97fbe5ad7f60b85b92b4d587d6d578ab877daff9 /src
parent9633ad35a8f5cb8274f9d8256812e02d8710c062 (diff)
downloadbox64-b02302a5cfb248eb333b01747516e76959e8c68d.tar.gz
box64-b02302a5cfb248eb333b01747516e76959e8c68d.zip
[BOX32] Fixed 32bits localtime_r wrapped function
Diffstat (limited to 'src')
-rwxr-xr-xsrc/wrapped32/wrappedlibc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c
index d7ade22b..5b2b2c6d 100755
--- a/src/wrapped32/wrappedlibc.c
+++ b/src/wrapped32/wrappedlibc.c
@@ -2064,9 +2064,11 @@ EXPORT void* my32_localtime_r(x64emu_t* emu, void* t, void* res)
     if(t) from_struct_L(&t_, to_ptrv(t));
     if(res) from_struct_iiiiiiiiilt(&res_, to_ptrv(res));
     void* ret = localtime_r(t?((void*)&t_):NULL, res?((void*)&res_):NULL);
-    if(ret==&res_)
+    if(ret==&res_) {
+        to_struct_iiiiiiiiilt(to_ptrv(res), &res_);
         return res;
-    return ret;
+    }
+    return NULL;
 }
 
 #if 0