From c00a29296c8d3446c7cfe253080c7e33358219b0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcelina=20Ko=C5=9Bcielnicka?= Date: Mon, 1 Mar 2021 20:01:39 +0100 Subject: [PATCH] sim: Avoid a crash on empty cell connection. Fixes #2513. --- passes/sat/sim.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc index 3ba66bd33..922be886c 100644 --- a/passes/sat/sim.cc +++ b/passes/sat/sim.cc @@ -271,7 +271,7 @@ struct SimInstance { auto child = children.at(cell); for (auto &conn: cell->connections()) - if (cell->input(conn.first)) { + if (cell->input(conn.first) && GetSize(conn.second)) { Const value = get_state(conn.second); child->set_state(child->module->wire(conn.first), value); } -- 2.30.2