From c14aab0fc419478a9422185a1c19d4e5381ba21f Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 17 Nov 2024 13:13:15 +0000 Subject: [PATCH] Fixed dangling reference bug that was resulting in invalid `mapped_io` segment in EDBG session object. --- src/Targets/Microchip/AVR8/TargetDescriptionFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Targets/Microchip/AVR8/TargetDescriptionFile.cpp b/src/Targets/Microchip/AVR8/TargetDescriptionFile.cpp index 5db876ef..73082009 100644 --- a/src/Targets/Microchip/AVR8/TargetDescriptionFile.cpp +++ b/src/Targets/Microchip/AVR8/TargetDescriptionFile.cpp @@ -114,7 +114,7 @@ namespace Targets::Microchip::Avr8 } const TargetDescription::MemorySegment& TargetDescriptionFile::getIoMemorySegment() const { - const auto addressSpace = this->getIoAddressSpace(); + const auto& addressSpace = this->getIoAddressSpace(); const auto segment = addressSpace.tryGetMemorySegment("io"); return segment.has_value() ? segment->get()