mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-23 04:38:55 +00:00
ast: fix new memory safety bugs from rebase
This commit is contained in:
parent
6cb789b2c2
commit
31002cf259
3 changed files with 12 additions and 3 deletions
|
@ -1505,7 +1505,7 @@ bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hin
|
|||
if (children[0]->type == AST_WIRE) {
|
||||
int width = 1;
|
||||
std::unique_ptr<AstNode> node;
|
||||
AstNode* child = children[0].release();
|
||||
AstNode* child = children[0].get();
|
||||
if (child->children.size() == 0) {
|
||||
// Base type (e.g., int)
|
||||
width = child->range_left - child->range_right +1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue