Skip to content

Commit 2f1bd75

Browse files
committed
remove redundant cast
1 parent 17afab7 commit 2f1bd75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/ql/src/Security/CWE-020/IncorrectSuffixCheck.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class IndexOfCall extends DataFlow::MethodCallNode {
5858
// both use the same concatenation of a string and a value
5959
exists(Expr origin, StringLiteral str, AddExpr otherAdd |
6060
this.getArgument(0).asExpr().(AddExpr).hasOperands(origin, str) and
61-
otherAdd = result.getArgument(0).asExpr().(AddExpr)
61+
otherAdd = result.getArgument(0).asExpr()
6262
|
6363
otherAdd.getAnOperand().(StringLiteral).getStringValue() = str.getStringValue() and
6464
otherAdd.getAnOperand().flow().getALocalSource() = origin.flow().getALocalSource()

0 commit comments

Comments
 (0)