summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2012-08-27 18:25:07 +0100
committerNick White <git@njw.me.uk>2012-08-27 18:25:07 +0100
commitd018a6fe229f8e0a3e5913baddd80ce19c476db9 (patch)
tree40310a469be5acf2fd3080f02aa5fd2f533aa518
parent3303d78ed929271674de61f260f48f22177be640 (diff)
GUI workarounds for windows weirdness
-rwxr-xr-xgetxbookgui.tcl4
1 files changed, 3 insertions, 1 deletions
diff --git a/getxbookgui.tcl b/getxbookgui.tcl
index d980c62..0c5c116 100755
--- a/getxbookgui.tcl
+++ b/getxbookgui.tcl
@@ -20,8 +20,10 @@ proc updateStatus {chan} {
if {![eof $chan]} {
set a [gets $chan]
if { $a != "" } {
+ # this string match appears to return true even when it shouldn't on windows
if { [string match "*%*" "$a"] } {
- if { [regexp {^([0-9]*)} $a m num] } {
+ # can't rely on the return value of regexp
+ if { [regexp {^([0-9]*)} $a m num] && "$num" != "" } {
.prog coords bar 0 0 [expr $num * 2] 20
}
} else { .st configure -text $a }