提交 fdceaac8 编写于 作者: J Justin Collins

Fix array indexing for like the fourth time

上级 cbd3b0d0
......@@ -450,11 +450,11 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
#
#Returns the value inside the array, if possible.
def process_array_access target, args
if args.length == 1 and integer? args[0]
index = args[0][1]
if args.length == 1 and integer? args.first
index = args.first.value
#Have to do this because first element is :array and we have to skip it
target[1..-1][index + 1]
target[1..-1][index]
else
nil
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册