mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-02-15 01:18:59 -06:00
Don't try to hash more bytes than the file contains
This commit is contained in:
@@ -40,6 +40,10 @@ namespace hex {
|
||||
|
||||
ImGui::InputInt("End", &this->m_hashEnd, 0, 0, ImGuiInputTextFlags_CharsHexadecimal);
|
||||
|
||||
size_t dataSize = this->m_dataProvider->getSize();
|
||||
if (this->m_hashEnd >= dataSize)
|
||||
this->m_hashEnd = dataSize - 1;
|
||||
|
||||
ImGui::NewLine();
|
||||
ImGui::Separator();
|
||||
ImGui::NewLine();
|
||||
|
||||
Reference in New Issue
Block a user