From 8609c384513745113e266be3198c6db63a53bb6c Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 4 Jan 2017 01:05:34 +0100 Subject: [PATCH] In LSO, lists of 1 element also evaluate to false (SVC-689). --- lslopt/lslbasefuncs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index a1f32f7..27f43b9 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -776,6 +776,9 @@ def cond(x): return bool(compare(x, ZERO_VECTOR, Eq=False)) if tx == Quaternion: return bool(compare(x, ZERO_ROTATION, Eq=False)) + if lslcommon.LSO and tx == list: + # SVC-689: lists of 1 element count as false + return len(x) > 1 return bool(x) # works fine for int, float, string, list def isinteger(x):