1
0
mirror of synced 2026-04-03 21:33:32 +00:00

Merge pull request #4876 from gadfort/segfault-lexer

liberty expression lexer check if characters are found and use size if not for `pin()`
This commit is contained in:
Martin Povišer
2025-02-07 20:24:08 +01:00
committed by GitHub

View File

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