mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Platform (Windows): don't error out on i686
This commit is contained in:
@@ -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, '\\', '/');
|
||||
|
||||
Reference in New Issue
Block a user