From 423761f41322cface6ca1b183fcd2f308f0fd009 Mon Sep 17 00:00:00 2001 From: Madeline Busig Date: Wed, 15 Jul 2026 19:17:27 -0700 Subject: [PATCH] Fix package_ip.tcl SplitSub incorrect results with start word containing delimiter --- tcl/package_ip.tcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcl/package_ip.tcl b/tcl/package_ip.tcl index e113f41..51c16fb 100644 --- a/tcl/package_ip.tcl +++ b/tcl/package_ip.tcl @@ -16,7 +16,10 @@ proc DictValueOr { dict key default } { # EX: [SplitSub buz.bar foo] => "" proc SplitSub { str startword } { if { [string first $startword $str] == 0 } { - set sepidx [string first "." "$str"] + # Start searching for the delimiter after the start word, otherwise + # start words containing a delimiter will yield incorrect results + set start_substr_idx [string length $startword] + set sepidx [string first "." "$str" $start_substr_idx] if { $sepidx == -1 } { return ""