From 7c88acfe61cb7ce9f3607d64a3260008c3e19289 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Tue, 15 Aug 2017 12:52:48 +0200 Subject: [PATCH] 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. --- lslopt/lslfoldconst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lslopt/lslfoldconst.py b/lslopt/lslfoldconst.py index fd6d480..7d410d0 100644 --- a/lslopt/lslfoldconst.py +++ b/lslopt/lslfoldconst.py @@ -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'