mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Fixed log_id() memory corruption
This commit is contained in:
parent
efd9604dfb
commit
02f0acb3bc
2 changed files with 10 additions and 5 deletions
|
@ -205,3 +205,11 @@ const char *log_signal(const RTLIL::SigSpec &sig, bool autoint)
|
|||
return string_buf.back().c_str();
|
||||
}
|
||||
|
||||
const char *log_id(std::string str)
|
||||
{
|
||||
if (str.size() > 1 && str[0] == '\\' && str[1] != '$')
|
||||
string_buf.push_back(str.substr(1));
|
||||
else
|
||||
string_buf.push_back(str);
|
||||
return string_buf.back().c_str();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue