From c523516092fa2bc9ba72fe911981253e3addfcf1 Mon Sep 17 00:00:00 2001 From: dsengupta0628 Date: Thu, 16 Apr 2026 22:00:48 +0000 Subject: [PATCH] reapply the changes from 2a559212 for reading weird DEFs Signed-off-by: dsengupta0628 --- network/ParseBus.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/network/ParseBus.cc b/network/ParseBus.cc index f71e2e4f..ff2ca44b 100644 --- a/network/ParseBus.cc +++ b/network/ParseBus.cc @@ -147,16 +147,16 @@ parseBusName(std::string_view name, && (isdigit(name[left + 1]) || name[left + 1] == '*')) { is_bus = true; bus_name.append(name.substr(0, left)); - // Check for bus range. - size_t range = name.find(':', left); - if (range != std::string_view::npos) { - is_range = true; - from = std::stoi(std::string(name.substr(left + 1))); - to = std::stoi(std::string(name.substr(range + 1))); - } + if (name[left + 1] == '*') + subscript_wild = true; else { - if (left + 1 < len && name[left + 1] == '*') - subscript_wild = true; + // Check for bus range. + size_t range = name.find(':', left); + if (range != std::string_view::npos) { + is_range = true; + from = std::stoi(std::string(name.substr(left + 1))); + to = std::stoi(std::string(name.substr(range + 1))); + } else from = to = std::stoi(std::string(name.substr(left + 1))); }