mirror of https://github.com/WerWolv/ImHex.git
Added some safety checks to thingy file parser
This commit is contained in:
parent
714b62049c
commit
5286a2d9ae
|
@ -45,10 +45,13 @@ namespace hex {
|
|||
hex::trim(from);
|
||||
hex::trim(to);
|
||||
|
||||
if (from.empty()) continue;
|
||||
if (to.empty()) to = " ";
|
||||
}
|
||||
|
||||
auto fromBytes = hex::parseByteString(from);
|
||||
if (fromBytes.empty()) continue;
|
||||
|
||||
if (!this->m_mapping.contains(fromBytes.size()))
|
||||
this->m_mapping.insert({ fromBytes.size(), { } });
|
||||
this->m_mapping[fromBytes.size()].insert({ fromBytes, to });
|
||||
|
|
Loading…
Reference in New Issue