From 9534f4ab809babad5f82d66efeba7a2fb633024d Mon Sep 17 00:00:00 2001 From: Peter Gadfort Date: Wed, 29 Jan 2025 15:56:05 -0500 Subject: [PATCH] check if characters are found and use size if not --- passes/techmap/libparse.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/passes/techmap/libparse.h b/passes/techmap/libparse.h index fef569927..16808fc58 100644 --- a/passes/techmap/libparse.h +++ b/passes/techmap/libparse.h @@ -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;