Don't try to hash more bytes than the file contains
This commit is contained in:
parent
9e62685fd1
commit
3dfff3c754
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user