From c02465b89232d15606a08976ded04d77e61a42d5 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 21 May 2023 10:23:33 +0200 Subject: [PATCH] fix: Byte type and Entropy graph being shifted --- plugins/builtin/include/content/helpers/diagrams.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/builtin/include/content/helpers/diagrams.hpp b/plugins/builtin/include/content/helpers/diagrams.hpp index a8c9f6d45..0afa62420 100644 --- a/plugins/builtin/include/content/helpers/diagrams.hpp +++ b/plugins/builtin/include/content/helpers/diagrams.hpp @@ -515,7 +515,7 @@ namespace hex { this->m_yBlockEntropy = sampleData(this->m_yBlockEntropy, std::min(this->m_blockCount, this->m_sampleSize)); size_t stride = std::max(1.0, double( - std::ceil((this->m_endAddress - this->m_startAddress) / this->m_blockSize) / this->m_yBlockEntropy.size())) + 1; + std::ceil((this->m_endAddress - this->m_startAddress) / this->m_blockSize) / this->m_yBlockEntropy.size())); this->m_blockCount = this->m_yBlockEntropy.size(); @@ -874,7 +874,7 @@ namespace hex { for (size_t i = 0; i < this->m_yBlockTypeDistributions.size(); ++i) this->m_yBlockTypeDistributions[i] = sampleData(this->m_yBlockTypeDistributions[i], std::min(this->m_blockCount, this->m_sampleSize)); - size_t stride = std::max(1.0, double(this->m_blockCount / this->m_yBlockTypeDistributions[0].size())) + 1; + size_t stride = std::max(1.0, double(this->m_blockCount / this->m_yBlockTypeDistributions[0].size())); this->m_blockCount = this->m_yBlockTypeDistributions[0].size(); // The m_xBlockTypeDistributions attribute is used to specify the position of entropy