Skip to content

Commit

Permalink
check if characters are found and use size if not
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfort committed Jan 29, 2025
1 parent aaa5347 commit 9534f4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions passes/techmap/libparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ namespace Yosys

std::string pin() {
auto length = s.find_first_of("\t()'!^*& +|");
if (length == std::string::npos) {
// nothing found so use size of s
length = s.size();
}
auto pin = s.substr(0, length);
s = s.substr(length, s.size());
return pin;
Expand Down

0 comments on commit 9534f4a

Please sign in to comment.