diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-12-16 13:56:45 -0800 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-12-16 13:56:45 -0800 |
commit | 4158ce4eda4853e89187824daa32fcb57f6dfa27 (patch) | |
tree | db4ed24c3f52589f973d4dcd449830ea264a96a0 /passes | |
parent | db0003410ff35ab39e3ea408684f600e75c16e78 (diff) | |
download | yosys-4158ce4eda4853e89187824daa32fcb57f6dfa27.tar.gz yosys-4158ce4eda4853e89187824daa32fcb57f6dfa27.tar.bz2 yosys-4158ce4eda4853e89187824daa32fcb57f6dfa27.zip |
More sloppiness, thanks @dh73 for spotting
Diffstat (limited to 'passes')
-rw-r--r-- | passes/memory/memory_bram.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/passes/memory/memory_bram.cc b/passes/memory/memory_bram.cc index 7ce5e80e1..29dc4ce07 100644 --- a/passes/memory/memory_bram.cc +++ b/passes/memory/memory_bram.cc @@ -331,11 +331,11 @@ struct rules_t if (GetSize(tokens) >= 2 && tokens[0] == "attribute") { data.attributes.emplace_back(); for (int idx = 1; idx <= GetSize(tokens)-1; idx++) { - size_t c1 = tokens[1][0] == '!' ? 1 : 0; - size_t c2 = tokens[1].find("="); + size_t c1 = tokens[idx][0] == '!' ? 1 : 0; + size_t c2 = tokens[idx].find("="); bool exists = (c1 == 0); - IdString key = RTLIL::escape_id(tokens[1].substr(c1, c2)); - Const val = c2 != std::string::npos ? tokens[1].substr(c2+1) : RTLIL::Const(1); + IdString key = RTLIL::escape_id(tokens[idx].substr(c1, c2)); + Const val = c2 != std::string::npos ? tokens[idx].substr(c2+1) : RTLIL::Const(1); data.attributes.back().emplace_back(exists, key, val); } |