mirror of https://github.com/YosysHQ/yosys.git
hashlib: prevent naive hashing of IdString when hashing SigBit
This commit is contained in:
parent
4d6b709d70
commit
dc7070b71f
|
@ -1819,8 +1819,10 @@ inline bool RTLIL::SigBit::operator!=(const RTLIL::SigBit &other) const {
|
|||
|
||||
inline Hasher RTLIL::SigBit::hash_acc(Hasher h) const {
|
||||
if (wire) {
|
||||
h = wire->name.hash_acc(h);
|
||||
h.acc(offset);
|
||||
// hash_acc isn't allowed to come first, or it might hash trivially
|
||||
// and possibly ruin things
|
||||
h = wire->name.hash_acc(h);
|
||||
return h;
|
||||
}
|
||||
h.acc(data);
|
||||
|
|
Loading…
Reference in New Issue