Skip to content

Commit 2c51f86

Browse files
committed
JS: avoid joining on =0
1 parent 6d7ac88 commit 2c51f86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javascript/ql/src/semmle/javascript/RangeAnalysis.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,9 @@ module RangeAnalysis {
497497
(x < 0 or x = 0 and sharpx = true) and
498498
(y > 0 or y = 0 and sharpy = false) and
499499
(
500-
x = 0
500+
x <= 0 and x >= 0
501501
or
502-
y = 0
502+
y <= 0 and y >= 0
503503
or
504504
// If non-zero, check that the values are within a factor 16 of each other
505505
x.abs().bitShiftRight(4) < y.abs() and

0 commit comments

Comments
 (0)