From f352c9945ba1ef60356c9e4b9284b2d34cd39bd3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Jul 2023 19:31:19 +0300 Subject: fixes #3568 (crash in 32-bit TDLIB, all we need is just hard code 0x28 as sizeof(basic_info), regardless SDK version) --- protocols/Telegram/tdlib/td/tdutils/td/utils/port/FileFd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/Telegram/tdlib/td/tdutils/td/utils/port/FileFd.cpp b/protocols/Telegram/tdlib/td/tdutils/td/utils/port/FileFd.cpp index bd5795d629..bb65daddb9 100644 --- a/protocols/Telegram/tdlib/td/tdutils/td/utils/port/FileFd.cpp +++ b/protocols/Telegram/tdlib/td/tdutils/td/utils/port/FileFd.cpp @@ -599,9 +599,7 @@ Result FileFd::stat() const { #ifdef _WIN64 auto status = GetFileInformationByHandleEx(get_native_fd().fd(), FileBasicInfo, &basic_info, sizeof(basic_info)); #else - BOOL bIsWow64 = FALSE; - IsWow64Process(GetCurrentProcess(), &bIsWow64); - auto status = GetFileInformationByHandleEx(get_native_fd().fd(), FileBasicInfo, &basic_info, bIsWow64 ? 0x28 : 0x24); + auto status = GetFileInformationByHandleEx(get_native_fd().fd(), FileBasicInfo, &basic_info, 0x28); #endif if (!status) { return OS_ERROR("Get FileBasicInfo failed"); -- cgit v1.2.3