select.cc: Fix %i when rhs is empty

This commit is contained in:
Krystine Sherwin 2025-03-14 14:08:16 +13:00
parent 2dec493054
commit 38293d3bdf
No known key found for this signature in database
1 changed files with 9 additions and 1 deletions

View File

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