Skip to content

Commit

Permalink
bug fix for index=-1 case
Browse files Browse the repository at this point in the history
  • Loading branch information
ruck314 committed Jul 19, 2024
1 parent c01e850 commit a5e9ffa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rogue/interfaces/memory/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri
}
} else {
if (type == rim::Read || type == rim::Verify) {
if (index < 0 || index >= var->numValues_) {
if (index < 0) {
lowByte = 0;
highByte = size_ - 1;
} else if (index >= var->numValues_) {
lowByte = var->lowTranByte_[0];
highByte = var->highTranByte_[0];
} else {
Expand Down

0 comments on commit a5e9ffa

Please sign in to comment.