mirror of https://github.com/YosysHQ/yosys.git
Merge 260cc42c2f into cede13a742
This commit is contained in:
commit
1becb2fee2
|
|
@ -702,8 +702,7 @@ std::string RTLIL::Const::decode_string() const
|
|||
ch |= 1 << j;
|
||||
}
|
||||
}
|
||||
if (ch != 0)
|
||||
s.append({ch});
|
||||
s.append({ch});
|
||||
}
|
||||
i -= 8;
|
||||
for (; i >= 0; i -= 8) {
|
||||
|
|
@ -713,10 +712,12 @@ std::string RTLIL::Const::decode_string() const
|
|||
ch |= 1 << j;
|
||||
}
|
||||
}
|
||||
if (ch != 0)
|
||||
s.append({ch});
|
||||
s.append({ch});
|
||||
}
|
||||
return s;
|
||||
auto first_char = s.find_first_not_of('\0');
|
||||
if (first_char != std::string::npos)
|
||||
return s.substr(first_char);
|
||||
else return s;
|
||||
}
|
||||
|
||||
int RTLIL::Const::size() const {
|
||||
|
|
|
|||
Loading…
Reference in New Issue