Skip to content

Commit 28b0eb1

Browse files
matthiasrichtersawenzel
authored andcommitted
Fix #402 index out of bound error in the vector of dummy test data
The index has to be divided by 2 to get the correct index in the array of test data. Comes from the fact that every payload message is preceded by a header message.
1 parent aeaed63 commit 28b0eb1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Utilities/aliceHLTwrapper/test/testMessageFormat.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ namespace o2::AliceHLT {
133133
BOOST_CHECK(output.mSize == sizeof(o2::Header::DataHeader));
134134
} else {
135135
o2::Header::hexDump("Payload block", output.mP, output.mSize);
136-
o2::Header::hexDump(" Data string", dataFields[dataidx].c_str(), dataFields[dataidx].size());
136+
o2::Header::hexDump(" Data string", dataFields[dataidx/2].c_str(), dataFields[dataidx/2].size() + 1);
137137
const char* data = (char*)output.mP;
138138
BOOST_CHECK(dataFields[dataidx/2] == data);
139139
}

0 commit comments

Comments
 (0)