Skip to content

Commit 1b68f86

Browse files
committed
Fix bug in CPP range analysis.
1 parent 99d8b48 commit 1b68f86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/semmle/code/cpp/rangeanalysis/RangeAnalysis.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private predicate safeCast(IntegralType fromtyp, IntegralType totyp) {
259259

260260
private class SafeCastInstruction extends ConvertInstruction {
261261
SafeCastInstruction() {
262-
safeCast(getResultType(), getUnary().getResultType())
262+
safeCast(getUnary().getResultType(), getResultType())
263263
or
264264
getResultType() instanceof PointerType and
265265
getUnary().getResultType() instanceof PointerType

0 commit comments

Comments
 (0)