3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-19 12:23:39 +00:00

ast: fix new memory safety bugs from rebase

This commit is contained in:
Emil J. Tywoniak 2025-06-17 15:25:57 +02:00
parent 20225d19ae
commit 5af4e05125
3 changed files with 12 additions and 3 deletions

View file

@ -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;