Skip to content

Commit 01a556e

Browse files
committed
PS: Ensure the constants 0 .. 10 always exists.
1 parent 5126963 commit 01a556e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

powershell/ql/lib/semmle/code/powershell/ConstantExpression.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class ConstExpr extends @constant_expression, BaseConstExpr {
1313
private newtype TConstantValue =
1414
TConstInteger(int value) {
1515
exists(ConstExpr ce | ce.getType() = "Int32" and ce.getValue().getValue().toInt() = value)
16+
or
17+
value = [0 .. 10] // needed for `trackKnownValue` in `DataFlowPrivate`
1618
} or
1719
TConstDouble(float double) {
1820
exists(ConstExpr ce | ce.getType() = "Double" and ce.getValue().getValue().toFloat() = double)

0 commit comments

Comments
 (0)