daywalker
07-30-2004, 05:56 AM
found a bug in imdb 2.3.3
if [channel info $chan] returns a list where the "+imdb" is not at the end of the list. the original code returns 0 instead of 1
proc channel_check { chan } {
foreach setting [channel info $chan] {
if {[regexp -- {^[\+-]} $setting]} {
if {![string compare "+imdb" $setting]} {
set permission 1
} else {
set permission 0
}
}
}
return $permission
}
you can fix with this function ...
proc channel_check { chan } {
foreach setting [channel info $chan] {
if {[regexp -- {^[\+-]} $setting]} {
if {![string compare "+imdb" $setting]} {
return 1;
}
}
}
return 0;
}
please fix it in the next version :)
if [channel info $chan] returns a list where the "+imdb" is not at the end of the list. the original code returns 0 instead of 1
proc channel_check { chan } {
foreach setting [channel info $chan] {
if {[regexp -- {^[\+-]} $setting]} {
if {![string compare "+imdb" $setting]} {
set permission 1
} else {
set permission 0
}
}
}
return $permission
}
you can fix with this function ...
proc channel_check { chan } {
foreach setting [channel info $chan] {
if {[regexp -- {^[\+-]} $setting]} {
if {![string compare "+imdb" $setting]} {
return 1;
}
}
}
return 0;
}
please fix it in the next version :)