1
0
mirror of synced 2024-12-01 02:37:18 +01:00

fix: Crash when searching for an empty string

This commit is contained in:
WerWolv 2022-07-31 15:17:24 +02:00
parent de2458f72d
commit a2443b26f7

View File

@ -133,7 +133,7 @@ namespace hex::plugin::builtin {
searchSequence.clear(); searchSequence.clear();
std::copy(this->m_input.begin(), this->m_input.end(), std::back_inserter(searchSequence)); std::copy(this->m_input.begin(), this->m_input.end(), std::back_inserter(searchSequence));
if (searchSequence.back() == 0x00) if (!searchSequence.empty() && searchSequence.back() == 0x00)
searchSequence.pop_back(); searchSequence.pop_back();
} }