mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Fix crash when a global was optimized out and another global depended on it.
This commit is contained in:
parent
e1d0753fec
commit
aaa8d3b7f4
1 changed files with 3 additions and 1 deletions
|
@ -358,7 +358,9 @@ class outscript(object):
|
||||||
if nt == 'DECL':
|
if nt == 'DECL':
|
||||||
ret = self.dent() + node['t'] + ' ' + self.FindName(node)
|
ret = self.dent() + node['t'] + ' ' + self.FindName(node)
|
||||||
if child:
|
if child:
|
||||||
if 'orig' in child[0]:
|
if 'orig' in child[0] and (child[0]['orig']['nt'] != 'IDENT'
|
||||||
|
or child[0]['orig']['name']
|
||||||
|
in self.symtab[child[0]['orig']['scope']]):
|
||||||
ret += ' = ' + self.OutExpr(child[0]['orig'])
|
ret += ' = ' + self.OutExpr(child[0]['orig'])
|
||||||
else:
|
else:
|
||||||
ret += ' = ' + self.OutExpr(child[0])
|
ret += ' = ' + self.OutExpr(child[0])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue