Fix bug in inlining of empty for() initializer
It was causing an exception. Fixed now. Thanks to Cindy Reynaud for reporting the problem and sending a backtrace.
This commit is contained in:
@@ -427,9 +427,8 @@ class inliner(object):
|
||||
del child[2]
|
||||
del child[0]
|
||||
child[1].ch.append(nr(nt='JUMP', t=None, name=lbl, scope=scope))
|
||||
fns.extend(self.RecurseExpression(child, 0, scope))
|
||||
fns = self.RecurseExpression(child, 0, scope)
|
||||
self.RecurseSingleStatement(child, 1, scope)
|
||||
#assert False, parent[index]
|
||||
|
||||
else:
|
||||
assert False, u"Unexpected node type: %s" % nt.decode('utf8')
|
||||
|
||||
10
unit_tests/regression.suite/inliner-for-bug.lsl
Normal file
10
unit_tests/regression.suite/inliner-for-bug.lsl
Normal file
@@ -0,0 +1,10 @@
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
for (; llSetRegionPos(<0,0,2>); llSleep(3))
|
||||
{
|
||||
llSleep(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
15
unit_tests/regression.suite/inliner-for-bug.out
Normal file
15
unit_tests/regression.suite/inliner-for-bug.out
Normal file
@@ -0,0 +1,15 @@
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
@___for__00001;
|
||||
if (llSetRegionPos(<0, 0, 2>))
|
||||
{
|
||||
{
|
||||
llSleep(4);
|
||||
}
|
||||
llSleep(3);
|
||||
jump ___for__00001;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
unit_tests/regression.suite/inliner-for-bug.run
Normal file
1
unit_tests/regression.suite/inliner-for-bug.run
Normal file
@@ -0,0 +1 @@
|
||||
main.py -y -O clear,inline -
|
||||
Reference in New Issue
Block a user