]> OCCT Git - occt-copy.git/commitdiff
0029247: Tests, CheckCommands.tcl - Tcl exception "expected integer but got 3dviewer...
authorapn <apn@opencascade.com>
Thu, 19 Oct 2017 09:08:05 +0000 (12:08 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 19 Oct 2017 09:27:45 +0000 (12:27 +0300)
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".

src/DrawResources/CheckCommands.tcl

index b9acbb100de88604307d0f598f349efda724f9c6..668e59ef316f4cbf92be1d1b7558bbf05c197443 100644 (file)
@@ -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 ${variable_to_save_value} ${variable_to_save_value}
         set ${variable_to_save_value} ${local_value}
         set toContinue 1
       }