From 75f4a3d92dd73401949e9bc624ff0e93925f69ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 2 Mar 2026 14:41:47 +0800 Subject: [PATCH] Platform (Windows): don't error out on i686 --- src/common/impl/FFPlatform_windows.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/impl/FFPlatform_windows.c b/src/common/impl/FFPlatform_windows.c index e20271d37..a8216b2c2 100644 --- a/src/common/impl/FFPlatform_windows.c +++ b/src/common/impl/FFPlatform_windows.c @@ -315,9 +315,11 @@ static void getSystemArchitecture(FFPlatformSysinfo* info) static void getCwd(FFPlatform* platform) { + #if _WIN64 static_assert( offsetof(RTL_USER_PROCESS_PARAMETERS, Reserved2[5]) == 0x38, "CurrentDirectory should be at offset 0x38 in RTL_USER_PROCESS_PARAMETERS. Structure layout mismatch detected."); + #endif PCURDIR cwd = (PCURDIR) &NtCurrentTeb()->ProcessEnvironmentBlock->ProcessParameters->Reserved2[5]; ffStrbufSetNWS(&platform->cwd, cwd->DosPath.Length / sizeof(WCHAR), cwd->DosPath.Buffer); ffStrbufReplaceAllC(&platform->cwd, '\\', '/');