Merge pull request #421 from garytwong/fix-lpf-locate-assertion-failure
Fix assertion failure on invalid LOCATE input.
This commit is contained in:
commit
571ad7d604
@ -101,6 +101,8 @@ bool Arch::applyLPF(std::string filename, std::istream &in)
|
|||||||
if (words.at(3) != "SITE")
|
if (words.at(3) != "SITE")
|
||||||
log_error("expected 'SITE' after 'LOCATE COMP %s' (on line %d)\n", cell.c_str(), lineno);
|
log_error("expected 'SITE' after 'LOCATE COMP %s' (on line %d)\n", cell.c_str(), lineno);
|
||||||
auto fnd_cell = cells.find(id(cell));
|
auto fnd_cell = cells.find(id(cell));
|
||||||
|
if (words.size() > 5)
|
||||||
|
log_error("unexpected input following LOCATE clause (on line %d)\n", lineno);
|
||||||
if (fnd_cell != cells.end()) {
|
if (fnd_cell != cells.end()) {
|
||||||
fnd_cell->second->attrs[id("LOC")] = strip_quotes(words.at(4));
|
fnd_cell->second->attrs[id("LOC")] = strip_quotes(words.at(4));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user