PhysicalMemory: ignores custom SMBIOS entry

Fixes less memory devices are reported on certain devices
Found this issue on my old Intel MacBook Pro
This commit is contained in:
Carter Li
2026-03-21 18:44:20 +08:00
parent ab17fb08ef
commit 1b543b1eb8
@@ -75,7 +75,7 @@ const char* ffDetectPhysicalMemory(FFlist* result)
if (!data)
return "Memory device is not found in SMBIOS data";
for (; data->Header.Type < FF_SMBIOS_TYPE_END_OF_TABLE;
for (; data->Header.Type != FF_SMBIOS_TYPE_END_OF_TABLE; // Ignores custom types (which is larger than 127)
data = (const FFSmbiosMemoryDevice*) ffSmbiosNextEntry(&data->Header))
{
if (data->Header.Type != FF_SMBIOS_TYPE_MEMORY_DEVICE) continue;