From: apn Date: Thu, 19 Oct 2017 09:08:05 +0000 (+0300) Subject: 0029247: Tests, CheckCommands.tcl - Tcl exception "expected integer but got 3dviewer... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=5850c67925ddd1df42e1e337fc95279f6d00a469;p=occt-copy.git 0029247: Tests, CheckCommands.tcl - Tcl exception "expected integer but got 3dviewer" in test cases on macOS Test cases on macOS (using native tcl from /usr/lib) fail when $lst starts with numeral, because upvar guesses that its first parameter is level rather than otherVar. The fix is to explicitly supply level to 1 (default value if uplevel is omitted) to avoid tcl exception "expected integer but got 3dviewer". --- diff --git a/src/DrawResources/CheckCommands.tcl b/src/DrawResources/CheckCommands.tcl index b9acbb100d..668e59ef31 100644 --- a/src/DrawResources/CheckCommands.tcl +++ b/src/DrawResources/CheckCommands.tcl @@ -473,7 +473,7 @@ proc _check_args { args {options {}} {command_name ""}} { set get_value [lindex ${option} 2] set local_value "" if { [_check_arg ${option_name} local_value ${get_value}] } { - upvar ${variable_to_save_value} ${variable_to_save_value} + upvar 1 ${variable_to_save_value} ${variable_to_save_value} set ${variable_to_save_value} ${local_value} set toContinue 1 }