diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetParameter.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetParameter.hpp index 34cbcdb8..9b0cdaff 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetParameter.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetParameter.hpp @@ -17,13 +17,13 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames * 5. Param value length (this->value.size()) - this is only one byte in size, so its value should * never exceed 255. */ - this->payload = std::vector(value.size() + 5, 0x00); + this->payload = std::vector(5, 0x00); this->payload[0] = 0x01; this->payload[1] = 0x00; this->payload[2] = static_cast(parameter.context); this->payload[3] = static_cast(parameter.id); this->payload[4] = static_cast(value.size()); - this->payload.insert(this->payload.begin() + 5, value.begin(), value.end()); + this->payload.insert(this->payload.end(), value.begin(), value.end()); } }; }