Skip to content

Commit

Permalink
Fix off-by-1 error when searching an Argos database string map (#417)
Browse files Browse the repository at this point in the history
- Fixes display bug where the wrong field can get converted to a
      string representation
  • Loading branch information
bdutro authored Apr 13, 2023
1 parent 6f0636f commit 1e7ac13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helios/pipeViewer/pipe_view/transactiondb/src/Reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ namespace sparta::pipeViewer {
const auto unique_id = loc_map_.at(transaction.location_ID);

// We are now going to use the In-memory data structure we built
//during the Reader construction.
// during the Reader construction.
// This Data Structure contains information about the name strings
// and their sizeof data
// for every different type of pair we have collected.
Expand Down Expand Up @@ -677,7 +677,7 @@ namespace sparta::pipeViewer {
// exists in the In-memory String Map. If yes, we grab the value
// and place it in the enum vector.
if(const auto it = stringMap_.find(std::make_tuple(pairt.valueVector[0].first,
i,
i-1, // string map doesn't include the UID field, so index 0 == field index 1
pairt.valueVector[i].first));
it != stringMap_.end()) {
pairt.stringVector.emplace_back(it->second);
Expand Down

0 comments on commit 1e7ac13

Please sign in to comment.