From 12218a4c744cb3877e5d9e78d15b7c2d90667907 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Thu, 28 Sep 2023 19:39:09 -0700 Subject: [PATCH] Unflip i and j. --- kernel/rtlil.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 3663ca864e0..9834a0d37af 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -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; } } @@ -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; } }