mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-01-25 14:09:05 -06:00
fix: Hexadecimal string inputs in data processor nodes behaving weirdly
This commit is contained in:
@@ -74,9 +74,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
void drawNode() override {
|
||||
ImGui::PushItemWidth(100_scaled);
|
||||
ImGui::InputTextIcon("##string", ICON_VS_SYMBOL_KEY, this->m_value);
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::InputTextMultiline("##string", this->m_value, ImVec2(150_scaled, 0), ImGuiInputTextFlags_AllowTabInput);
|
||||
}
|
||||
|
||||
void process() override {
|
||||
@@ -918,6 +916,8 @@ namespace hex::plugin::builtin {
|
||||
void process() override {
|
||||
auto input = this->getBufferOnInput(0);
|
||||
|
||||
input.erase(std::remove_if(input.begin(), input.end(), [](u8 c) { return std::isspace(c); }), input.end());
|
||||
|
||||
if (input.size() % 2 != 0)
|
||||
throwNodeError("Can't decode odd number of hex characters");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user