Fix bad join order in comparesFirstCharacter

This commit is contained in:
Owen Mansel-Chan
2025-02-20 14:49:25 +00:00
parent a1b7096125
commit 7b6a91e90e

View File

@@ -110,8 +110,8 @@ module StringOps {
DataFlow::EqualityTestNode eq, DataFlow::Node str, DataFlow::Node rhs
) {
exists(DataFlow::ElementReadNode read |
eq.hasOperands(globalValueNumber(read).getANode(), rhs) and
str = read.getBase() and
eq.hasOperands(globalValueNumber(pragma[only_bind_out](read)).getANode(), rhs) and
str = pragma[only_bind_out](read).getBase() and
str.getType().getUnderlyingType() instanceof StringType and
read.getIndex().getIntValue() = 0
)