mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
impr: Disallow saving pattern files if they're empty
This commit is contained in:
@@ -870,7 +870,10 @@ namespace hex::plugin::builtin {
|
||||
|
||||
file.writeString(wolv::util::trim(this->m_textEditor.GetText()));
|
||||
});
|
||||
}, ImHexApi::Provider::isValid);
|
||||
}, [this] {
|
||||
return !wolv::util::trim(this->m_textEditor.GetText()).empty() && ImHexApi::Provider::isValid();
|
||||
}
|
||||
);
|
||||
|
||||
constexpr static std::array<std::pair<const char *, size_t>, 21> Types = {{
|
||||
{ "u8", 1 }, { "u16", 2 }, { "u24", 3 }, { "u32", 4 }, { "u48", 6 }, { "u64", 8 }, { "u96", 12 }, { "u128", 16 },
|
||||
|
||||
Reference in New Issue
Block a user