diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 07:36:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-14 07:36:16 (GMT) |
commit | 075429fc2cc7afc986bc3839feacf935c89ccbc7 (patch) | |
tree | 974fdecf07326f588f07e04256d91c98b2fde350 /library/tearoff.tcl | |
parent | 26d2f8ec042c3a1c076a64a8651aa88294ff6a0f (diff) | |
download | tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.zip tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.tar.gz tk-075429fc2cc7afc986bc3839feacf935c89ccbc7.tar.bz2 |
Use consistant $idx < 0 in stead of $idx != -1 for checking index meaning 'not found'
Diffstat (limited to 'library/tearoff.tcl')
-rw-r--r-- | library/tearoff.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/tearoff.tcl b/library/tearoff.tcl index 4c8b404..dece4df 100644 --- a/library/tearoff.tcl +++ b/library/tearoff.tcl @@ -153,7 +153,7 @@ proc ::tk::MenuDup {src dst type} { # Copy tags to x, replacing each substring of src with dst. - while {[set index [string first $src $tags]] != -1} { + while {[set index [string first $src $tags]] >= 0} { if {$index > 0} { append x [string range $tags 0 $index-1]$dst } @@ -170,7 +170,7 @@ proc ::tk::MenuDup {src dst type} { # Copy script to x, replacing each substring of event with dst. - while {[set index [string first $event $script]] != -1} { + while {[set index [string first $event $script]] >= 0} { if {$index > 0} { append x [string range $script 0 $index-1] } |