diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/TopLevelGroupItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/TopLevelGroupItem.cpp index 47d8e86f..f8b21cfc 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/TopLevelGroupItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/TopLevelGroupItem.cpp @@ -29,10 +29,8 @@ namespace Bloom::Widgets const auto& currentStackPointer = this->hexViewerState.currentStackPointer; const auto stackGroupingRequired = currentStackPointer.has_value() && this->hexViewerState.settings.groupStackMemory - && ( - static_cast(this->hexViewerState.memoryDescriptor.addressRange.endAddress) - - static_cast(*currentStackPointer + 1) - ) > 0; + && *currentStackPointer >= this->hexViewerState.memoryDescriptor.addressRange.startAddress + && (*currentStackPointer + 1) <= this->hexViewerState.memoryDescriptor.addressRange.endAddress; for (const auto& focusedRegion : this->focusedMemoryRegions) { if (