1
0
mirror of synced 2024-11-28 17:40:51 +01:00

fix: Uninitialized value build issue

This commit is contained in:
WerWolv 2023-02-19 09:18:17 +01:00
parent 0017cd2e40
commit 277c83e6d8
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ namespace hex::plugin::builtin {
bool m_shouldInvalidate = true;
std::endian m_endian = std::endian::native;
std::endian m_endian = std::endian::native;
ContentRegistry::DataInspector::NumberDisplayStyle m_numberDisplayStyle = ContentRegistry::DataInspector::NumberDisplayStyle::Decimal;
bool m_invert = false;
@ -38,7 +38,7 @@ namespace hex::plugin::builtin {
std::vector<InspectorCacheEntry> m_cachedData, m_workData;
TaskHolder m_updateTask;
std::string m_editingValue;
std::string m_editingValue = "";
};
}

View File

@ -142,7 +142,7 @@ namespace hex::plugin::builtin {
}, [](std::string value, std::endian endian) -> std::vector<u8> {
hex::unused(endian);
if (value.starts_with("0b"))
if (value.size() > 2 && value.starts_with("0b"))
value = value.substr(2);
if (value.size() > 8) return { };