Skip to content

Commit

Permalink
select.cc: Fix %i when rhs is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Nov 26, 2024
1 parent 11ee9ca commit 4ab59a9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion passes/cmds/select.cc
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,17 @@ static void select_op_intersect(RTLIL::Design *design, RTLIL::Selection &lhs, co
if (rhs.full_selection && !lhs.selects_boxes)
return;

if (lhs.empty() || rhs.empty())
if (lhs.empty())
return;

if (rhs.empty()) {
lhs.full_selection = false;
lhs.complete_selection = false;
lhs.selected_modules.clear();
lhs.selected_members.clear();
return;
}

select_all(design, lhs);

std::vector<RTLIL::IdString> del_list;
Expand Down

0 comments on commit 4ab59a9

Please sign in to comment.