fix: Chunk size setting in information view being reset the first time

This commit is contained in:
WerWolv 2023-07-06 00:00:56 +02:00
parent 695e11477e
commit 924c816dbd
2 changed files with 6 additions and 6 deletions

@ -1 +1 @@
Subproject commit 63d2bd325837ce112e9e34b146246cda571c58e5
Subproject commit a31e6efc925ffdf10ea9be758d050c3a603a94d6

View File

@ -67,14 +67,14 @@ namespace hex::plugin::builtin {
this->m_analyzerTask = TaskManager::createTask("hex.builtin.view.information.analyzing", 0, [this](auto &task) {
auto provider = ImHexApi::Provider::get();
if ((this->m_inputChunkSize <= 0)
|| (this->m_analyzedRegion.getStartAddress() >= this->m_analyzedRegion.getEndAddress())
|| (this->m_analyzedRegion.getEndAddress() > provider->getActualSize())) {
// Invalid parameters, set default one
this->m_inputChunkSize = 256;
if ((this->m_analyzedRegion.getStartAddress() >= this->m_analyzedRegion.getEndAddress()) || (this->m_analyzedRegion.getEndAddress() > provider->getActualSize())) {
this->m_analyzedRegion = { provider->getBaseAddress(), provider->getActualSize() };
}
if (this->m_inputChunkSize <= 0) {
this->m_inputChunkSize = 256;
}
task.setMaxValue(this->m_analyzedRegion.getSize());
{