generated from maddiebusig/vivado-template-hog
Fix package_ip.tcl SplitSub incorrect results with start word containing
delimiter
This commit is contained in:
parent
1f1fe1dff0
commit
423761f413
@ -16,7 +16,10 @@ proc DictValueOr { dict key default } {
|
|||||||
# EX: [SplitSub buz.bar foo] => ""
|
# EX: [SplitSub buz.bar foo] => ""
|
||||||
proc SplitSub { str startword } {
|
proc SplitSub { str startword } {
|
||||||
if { [string first $startword $str] == 0 } {
|
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 } {
|
if { $sepidx == -1 } {
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user