Skip to content
Snippets Groups Projects
Commit 00c14761 authored by Grigoris Pavlakis's avatar Grigoris Pavlakis
Browse files

Fix a bug in reportParameterIds() caused by the transition to...

Fix a bug in reportParameterIds() caused by the transition to calling-by-reference, namely: not resetting the reading position before attempting reads, resulting in incorrect data being read
parent f19e1729
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,9 @@ ParameterService::ParameterService() {
void ParameterService::reportParameterIds(Message& paramIds) {
Message reqParam(20, 2, Message::TM, 1); // empty TM[20, 2] parameter report message
paramIds.resetRead(); // since we're passing a reference, the reading position shall be reset
// to its default before any read operations (to ensure the correct data is being read)
// assertion: correct message, packet and service type (at failure throws an
// InternalError::UnacceptablePacket)
ErrorHandler::assertRequest(paramIds.packetType == Message::TC, paramIds,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment