Skip to content

Commit 6be78d4

Browse files
committed
Python: fix compilation
1 parent 2df846e commit 6be78d4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

python/ql/src/semmle/python/regex.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,7 @@ abstract class RegexString extends Expr {
396396
}
397397

398398
pragma[inline]
399-
private predicate isOctal(int index) {
400-
this.getChar(index) in [0..7].toString()
401-
}
399+
private predicate isOctal(int index) { this.getChar(index) = [0 .. 7].toString() }
402400

403401
/** Holds if `index` is inside a character set. */
404402
predicate inCharSet(int index) {
@@ -708,9 +706,7 @@ abstract class RegexString extends Expr {
708706
svalue = text.substring(start + 1, start + len) and
709707
value = svalue.toInt() and
710708
// value is composed of digits
711-
forall(int i | i in [start + 1 .. start + len - 1] |
712-
this.getChar(i) in [0..9].toString()
713-
) and
709+
forall(int i | i in [start + 1 .. start + len - 1] | this.getChar(i) = [0 .. 9].toString()) and
714710
// a longer reference is not possible
715711
not (
716712
len = 2 and

0 commit comments

Comments
 (0)