mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05: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 {
|
void drawNode() override {
|
||||||
ImGui::PushItemWidth(100_scaled);
|
ImGui::InputTextMultiline("##string", this->m_value, ImVec2(150_scaled, 0), ImGuiInputTextFlags_AllowTabInput);
|
||||||
ImGui::InputTextIcon("##string", ICON_VS_SYMBOL_KEY, this->m_value);
|
|
||||||
ImGui::PopItemWidth();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void process() override {
|
void process() override {
|
||||||
@@ -918,6 +916,8 @@ namespace hex::plugin::builtin {
|
|||||||
void process() override {
|
void process() override {
|
||||||
auto input = this->getBufferOnInput(0);
|
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)
|
if (input.size() % 2 != 0)
|
||||||
throwNodeError("Can't decode odd number of hex characters");
|
throwNodeError("Can't decode odd number of hex characters");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user