Fix type of != in llGetListLength substitution.

It was returning list instead of integer, causing inconsistencies in some comparisons depending on whether llGetListLength(L) or (L!=[]) was used.
This commit is contained in:
Sei Lisa 2017-08-15 12:52:48 +02:00
parent fe574bb462
commit 7c88acfe61

View file

@ -1049,7 +1049,7 @@ class foldconst(object):
elif self.optlistlength and node['name'] == 'llGetListLength':
# Convert llGetListLength(expr) to (expr != [])
node = {'nt':'CONST', 't':'list', 'value':[]}
parent[index] = node = {'nt':'!=', 't':'list',
parent[index] = node = {'nt':'!=', 't':'integer',
'ch':[child[0], node]}
elif (node['name'] == 'llDumpList2String'
and child[1]['nt'] == 'CONST'