1
0
Fork 0

Fixed parentheses when checking conditional view-name property.

Avoids stepping through invalid views.
This commit is contained in:
ThorstenB 2011-07-03 16:06:14 +02:00
parent 18db6c8a7b
commit a0256e47ed

View file

@ -100,8 +100,9 @@ var stepView = func(step, force = 0) {
n = size(views) - 1;
elsif (n >= size(views))
n = 0;
if (force or (var e = (views[n].getNode("enabled"))) == nil or
(e.getBoolValue() and (views[n].getNode("name")!=nil)))
var e = views[n].getNode("enabled");
if (force or (e == nil or e.getBoolValue()) and
(views[n].getNode("name")!=nil))
break;
}
setprop("/sim/current-view/view-number", n);