Skip to content

Commit

Permalink
Unflip i and j.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmlarsen committed Sep 29, 2023
1 parent 01a0157 commit 12218a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/rtlil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ std::string RTLIL::Const::decode_string() const
if (i < n) {
char ch = 0;
for (int j = 0; j < (n - i); j++) {
if (bits[j + i] == RTLIL::State::S1) {
if (bits[i + j] == RTLIL::State::S1) {
ch |= 1 << j;
}
}
Expand All @@ -332,7 +332,7 @@ std::string RTLIL::Const::decode_string() const
for (; i >= 0; i -= 8) {
char ch = 0;
for (int j = 0; j < 8; j++) {
if (bits[j + i] == RTLIL::State::S1) {
if (bits[i + j] == RTLIL::State::S1) {
ch |= 1 << j;
}
}
Expand Down

0 comments on commit 12218a4

Please sign in to comment.