This commit is contained in:
gnembon committed 2021-06-11 00:42:49 -03:00
1 parent a7770abf9d
commit c36f9bfb9f
1 file changed
+1 -2
@@ -436,10 +436,9 @@ public class ListValue extends AbstractListValue implements ContainerValueInterf
@Override
public Value get(Value value)
{
long index = NumericValue.asNumber(value, "'address' to a list index").getLong();
int size = items.size();
if (size == 0) return Value.NULL;
return items.get(normalizeIndex(index, size));
return items.get(normalizeIndex(NumericValue.asNumber(value, "'address' to a list index").getLong(), size));
}
@Override