ui: Fixed advanced decoding cell sizes

This commit is contained in:
WerWolv
2022-07-16 12:14:06 +02:00
parent 831dac9b47
commit 5ee3b550bc
2 changed files with 18 additions and 10 deletions

View File

@@ -38,8 +38,6 @@ namespace hex {
{
auto delimiterPos = line.find('=');
if (delimiterPos == std::string::npos)
continue;
if (delimiterPos >= line.length())
continue;
@@ -47,12 +45,16 @@ namespace hex {
to = line.substr(delimiterPos + 1);
if (from.empty()) continue;
if (to.empty()) to = " ";
}
auto fromBytes = hex::parseByteString(from);
if (fromBytes.empty()) continue;
if (to.length() > 1)
hex::trim(to);
if (to.empty())
to = " ";
if (!this->m_mapping.contains(fromBytes.size()))
this->m_mapping.insert({ fromBytes.size(), {} });
this->m_mapping[fromBytes.size()].insert({ fromBytes, to });