From: Herman Semenoff <GermanAizek@yandex.ru> References: https://en.wikipedia.org/wiki/Year_2038_problem https://www.gnu.org/software/gnulib/manual/html_node/Avoiding-the-year-2038-... --- dlls/msvcrt/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 8199fe01649..05999f12116 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -758,7 +758,7 @@ void CDECL _ftime32(struct __timeb32 *buf) struct __timeb64 buf64; _ftime64( &buf64 ); - buf->time = buf64.time; + buf->time = (buf64.time == (__time32_t)buf64.time) ? (__time32_t)buf64.time : -1; buf->millitm = buf64.millitm; buf->timezone = buf64.timezone; buf->dstflag = buf64.dstflag; @@ -798,7 +798,7 @@ __time32_t CDECL _time32(__time32_t *buf) _ftime64(&tb); - curtime = tb.time; + curtime = (tb.time == (__time32_t)tb.time) ? (__time32_t)tb.time : -1; return buf ? *buf = curtime : curtime; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9988