1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-07 07:55:04 -05:00

Fixed DMI memory speed.

This commit is contained in:
XMRig
2021-01-24 15:56:02 +07:00
parent 0fa5db8fa3
commit 1424b2975f

View File

@@ -171,7 +171,8 @@ xmrig::DmiMemory::DmiMemory(dmi_header *h)
return;
}
m_speed = std::max<uint64_t>(m_speed, dmi_memory_device_speed(dmi_get<uint16_t>(h, 0x20), h->length >= 0x5C ? dmi_get<uint32_t>(h, 0x58) : 0) * 1000000ULL);
const uint64_t configuredSpeed = dmi_memory_device_speed(dmi_get<uint16_t>(h, 0x20), h->length >= 0x5C ? dmi_get<uint32_t>(h, 0x58) : 0) * 1000000ULL;
m_speed = configuredSpeed ? configuredSpeed : m_speed;
if (h->length < 0x28) {
return;