Corrected stack pointer validation in TopLevelGroupItem

This commit is contained in:
Nav
2023-04-26 19:36:15 +01:00
parent e285d4c912
commit 078aa0acb6

View File

@@ -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<std::int64_t>(this->hexViewerState.memoryDescriptor.addressRange.endAddress)
- static_cast<std::int64_t>(*currentStackPointer + 1)
) > 0;
&& *currentStackPointer >= this->hexViewerState.memoryDescriptor.addressRange.startAddress
&& (*currentStackPointer + 1) <= this->hexViewerState.memoryDescriptor.addressRange.endAddress;
for (const auto& focusedRegion : this->focusedMemoryRegions) {
if (