From 6d9b29d1bcd33f753c19cd74dac54bca234045e2 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 2 Feb 2022 22:37:40 +0000 Subject: [PATCH] Truncated focused memory regions in value annotations, when configured as signed integers and the size exceeds 8 bytes. --- .../HexViewerWidget/ValueAnnotationItem.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ValueAnnotationItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ValueAnnotationItem.cpp index 6ef2f2d1..ebade458 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ValueAnnotationItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ValueAnnotationItem.cpp @@ -72,15 +72,13 @@ void ValueAnnotationItem::refreshLabelText() { break; } - if (valueSize <= 8) { - std::int64_t integerValue = 0; - for (const auto& byte : this->value) { - integerValue = (integerValue << 8) | byte; - } - - this->labelText = QString::number(integerValue); - break; + std::int64_t integerValue = 0; + for (const auto& byte : this->value) { + integerValue = (integerValue << 8) | byte; } + + this->labelText = QString::number(integerValue); + break; } case MemoryRegionDataType::ASCII_STRING: { // Replace non-ASCII chars with '?'