From d8629f9200537eb60765e5cfed73aa6719267c10 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sun, 24 May 2015 04:22:31 +0200 Subject: [PATCH] Update behaviour of llListFindList for LSO. --- lslopt/lslbasefuncs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index 8126b1d..c345628 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -1099,7 +1099,9 @@ def llListFindList(lst, elems): if L2 > L1: return -1 # can't find a sublist longer than the original list if L2 == 0: - return 0 # empty list is always found at position 0 + # empty list is always found at position 0 in Mono, + # and in LSO if the first list isn't empty + return -1 if lslcommon.LSO and L1 == 0 else 0 for i in xrange(L1-L2+1): for j in xrange(L2): e1 = lst[i+j]