Fix crash due to lack of A/Y ports

This commit is contained in:
Akash Levy 2026-04-08 00:28:43 -07:00
parent bf3afc569a
commit ed11f4c135
1 changed files with 3 additions and 0 deletions

View File

@ -183,6 +183,9 @@ struct OptVpsWorker
Cell *drv = bit_drivers.at(b, nullptr);
if (!drv) return 0;
if (!drv->hasPort(ID::Y) || !drv->hasPort(ID::A))
return 0;
int bit_pos = -1;
SigSpec dy = drv->getPort(ID::Y);
for (int j = 0; j < GetSize(dy); j++)