diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp index 2fde3a42..4368501d 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp @@ -28,22 +28,17 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr "contained invalid event data size."); } - auto eventData = std::vector(); - /* * Ignore the SOF, protocol version, handler id and sequence ID (which all make up 5 bytes in total, 7 if we * include the two size bytes) */ - eventData.insert( - eventData.end(), + this->eventData = std::vector( responseData.begin() + 7, responseData.begin() + 7 + static_cast(responsePacketSize) ); - this->setEventData(eventData); - - if (!eventData.empty()) { - this->eventId = eventData[0]; + if (!this->eventData.empty()) { + this->eventId = this->eventData[0]; } } }