From 27c669f67f73b437aa8486dbb970129414986e15 Mon Sep 17 00:00:00 2001 From: Luxferre Date: Sat, 12 Oct 2024 17:05:16 +0300 Subject: [PATCH] v0.4: fixed default value validation for v3 --- armagedec.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/armagedec.tcl b/armagedec.tcl index d99672c..880f2b6 100755 --- a/armagedec.tcl +++ b/armagedec.tcl @@ -7,7 +7,7 @@ package require Tk -set appversion 0.3 +set appversion 0.4 set scriptpath [file normalize [info script]] set appdir [file dirname $scriptpath] # check if we're running from a starpack @@ -359,7 +359,9 @@ proc fullscanscheme {version} { if {$size eq 1} {set fmt cu} if {$size eq 2} {set fmt s} if {$size eq 4} {set fmt i} - binary scan [string range $rawschemedata $offs [expr {$offs + $size}]] $fmt wscval + set newval "" + binary scan [string range $rawschemedata $offs [expr {$offs + $size}]] $fmt newval + if {$newval ne ""} {set wscval $newval} if {([llength $valopt] > 1) && ([lindex $valopt 0] eq "spec")} { set readfunc "[lindex $valopt 1]_read" set wscval [$readfunc $wscval]