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.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user