From 464d8e39e083a2f3a73f2c33a7b20036406541c8 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 28 Feb 2025 17:41:28 +0100 Subject: Dep/CascLib: Update to ladislav-zezula/CascLib@07ab5f37ad282cc101d5c17793c550a0a6d4637f --- dep/CascLib/src/common/Common.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dep/CascLib/src/common/Common.cpp') diff --git a/dep/CascLib/src/common/Common.cpp b/dep/CascLib/src/common/Common.cpp index 6058bf28b75..a33099b3c6b 100644 --- a/dep/CascLib/src/common/Common.cpp +++ b/dep/CascLib/src/common/Common.cpp @@ -77,7 +77,9 @@ unsigned char IntToHexChar[] = "0123456789abcdef"; //----------------------------------------------------------------------------- // GetCascError/SetCascError support for non-Windows platform -static DWORD dwLastError = ERROR_SUCCESS; +#ifndef CASCLIB_PLATFORM_WINDOWS +static __thread DWORD dwLastError = ERROR_SUCCESS; +#endif DWORD GetCascError() { @@ -92,8 +94,9 @@ void SetCascError(DWORD dwErrCode) { #ifdef CASCLIB_PLATFORM_WINDOWS SetLastError(dwErrCode); -#endif +#else dwLastError = dwErrCode; +#endif } //----------------------------------------------------------------------------- -- cgit v1.2.3