1
0
mirror of synced 2024-11-12 02:00:52 +01:00

Don't try to hash more bytes than the file contains

This commit is contained in:
WerWolv 2020-11-11 11:56:24 +01:00
parent 9e62685fd1
commit 3dfff3c754

View File

@ -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();