From 68902c20f43e6a38a1c58f3a95d2606e897484f5 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Mon, 16 Jan 2017 23:23:34 +0100 Subject: [PATCH] Make llGetAgentList more specific. Testing shows that AGENT_LIST_xxx values are not used as a bitfield, but as an enum. There are only three possible valid values. Check only those three. --- lslopt/lslextrafuncs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lslopt/lslextrafuncs.py b/lslopt/lslextrafuncs.py index 94311cf..cafe9f0 100644 --- a/lslopt/lslextrafuncs.py +++ b/lslopt/lslextrafuncs.py @@ -161,7 +161,7 @@ def llGetAgentLanguage(id): def llGetAgentList(scope, options): assert isinteger(scope) assert islist(options) - if scope == 0: + if scope not in (1, 2, 4): return [u'INVALID_SCOPE'] raise ELSLCantCompute @@ -175,6 +175,8 @@ def llGetAlpha(face): assert isinteger(face) if face > 8: return 1.0 + # Negative face numbers return (float)llGetNumberOfSides(), which isn't + # computable. raise ELSLCantCompute def llGetAnimation(id):