Merge pull request #97 from zeldin/master

Fix a segfault in dffinit when the value has too few bits
This commit is contained in:
Clifford Wolf 2015-11-08 22:16:49 +01:00
commit faa3da5a1b
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ struct DffinitPass : public Pass {
for (int i = 0; i < GetSize(sig); i++) {
if (init_bits.count(sig[i]) == 0)
continue;
while (GetSize(value.bits) < i)
while (GetSize(value.bits) <= i)
value.bits.push_back(State::S0);
value.bits[i] = init_bits.at(sig[i]);
cleanup_bits.insert(sig[i]);