#2123 Ignore regex exception.
This commit is contained in:
parent
31a5d05dc1
commit
4a8e7510e1
@ -230,6 +230,7 @@ void xmrig::DmiMemory::setId(const char *slot, const char *bank)
|
|||||||
m_slot = slot;
|
m_slot = slot;
|
||||||
m_bank = bank;
|
m_bank = bank;
|
||||||
|
|
||||||
|
try {
|
||||||
std::cmatch cm;
|
std::cmatch cm;
|
||||||
if (std::regex_match(slot, cm, std::regex("^Channel([A-Z])[-_]DIMM(\\d+)$", std::regex_constants::icase))) {
|
if (std::regex_match(slot, cm, std::regex("^Channel([A-Z])[-_]DIMM(\\d+)$", std::regex_constants::icase))) {
|
||||||
m_id = fmt::format(kIdFormat, cm.str(1), cm.str(2)).c_str();
|
m_id = fmt::format(kIdFormat, cm.str(1), cm.str(2)).c_str();
|
||||||
@ -240,4 +241,5 @@ void xmrig::DmiMemory::setId(const char *slot, const char *bank)
|
|||||||
m_id = fmt::format(kIdFormat, cm.str(1), cm2.str(1)).c_str();
|
m_id = fmt::format(kIdFormat, cm.str(1), cm2.str(1)).c_str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (...) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user