Skip to content

Commit 40f50dd

Browse files
committed
PS: Ensure the parameter has the right enclosing function.
1 parent 0fb75af commit 40f50dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

powershell/ql/lib/semmle/code/powershell/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ module Trees {
198198
exists(Parameter p |
199199
p =
200200
rank[i + 1](Parameter cand, int j |
201-
cand.hasDefaultValue() and j = cand.getFunctionIndex()
201+
cand.hasDefaultValue() and func.getFunctionParameter(j) = cand
202202
|
203203
cand order by j
204204
) and

0 commit comments

Comments
 (0)