mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Swap (Windows): fix detection in i686 build
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
const char* ffDetectSwap(FFSwapResult* swap)
|
||||
{
|
||||
ULONG size = sizeof(SYSTEM_PAGEFILE_INFORMATION);
|
||||
ULONG size = sizeof(SYSTEM_PAGEFILE_INFORMATION) * 2;
|
||||
SYSTEM_PAGEFILE_INFORMATION* FF_AUTO_FREE pstart = (SYSTEM_PAGEFILE_INFORMATION*)malloc(size);
|
||||
while(true)
|
||||
{
|
||||
@@ -16,6 +16,7 @@ const char* ffDetectSwap(FFSwapResult* swap)
|
||||
{
|
||||
if(!(pstart = (SYSTEM_PAGEFILE_INFORMATION*)realloc(pstart, size)))
|
||||
return "realloc(pstart, size) failed";
|
||||
continue;
|
||||
}
|
||||
else if(!NT_SUCCESS(status))
|
||||
return "NtQuerySystemInformation(SystemPagefileInformation, size) failed";
|
||||
|
||||
Reference in New Issue
Block a user