fix: Multi-byte hex editor data visualizers behaving incorrectly
This commit is contained in:
parent
27f420c8ea
commit
1f73a87327
@ -162,7 +162,7 @@ namespace hex::plugin::builtin {
|
|||||||
hex::unused(address, upperCase, startedEditing);
|
hex::unused(address, upperCase, startedEditing);
|
||||||
|
|
||||||
if (size == ByteCount) {
|
if (size == ByteCount) {
|
||||||
return drawDefaultScalarEditingTextBox(address, getFormatString(upperCase), ImGui::getImGuiDataType<u8>(), data, ImGuiInputTextFlags_CharsScientific);
|
return drawDefaultScalarEditingTextBox(address, getFormatString(upperCase), ImGui::getImGuiDataType<T>(), data, ImGuiInputTextFlags_CharsScientific);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
@ -162,8 +162,11 @@ namespace hex::plugin::builtin::ui {
|
|||||||
|
|
||||||
if (this->m_shouldUpdateEditingValue && address == this->m_editingAddress) {
|
if (this->m_shouldUpdateEditingValue && address == this->m_editingAddress) {
|
||||||
this->m_shouldUpdateEditingValue = false;
|
this->m_shouldUpdateEditingValue = false;
|
||||||
this->m_editingBytes.resize(size);
|
|
||||||
std::memcpy(this->m_editingBytes.data(), data, size);
|
if (this->m_editingBytes.size() < size) {
|
||||||
|
this->m_editingBytes.resize(size);
|
||||||
|
std::memcpy(this->m_editingBytes.data(), data, size);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_editingAddress != address || this->m_editingCellType != cellType) {
|
if (this->m_editingAddress != address || this->m_editingCellType != cellType) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user