Commit de2e570
QQuaternion: fix qFuzzyCompare() precondition violation
qFuzzyCompare() requires that neither argument is numerically
zero. One user of this function cannot guarantee this, because, while
they check for zero, they do so _after_ calling qFuzzyCompare() with
that value, so the check comes too late.
Fix by swapping the two checks around (so we check for == 0 before we
check for == 1).
Amends 8c1532e, which changed from
qFuzzyIsNull(x - 1) (which doesn't have the problem) to
qFuzzyCompare(x, 1) (which does).
Pick-to: 6.8 6.5
Task-number: QTBUG-142020
Change-Id: I054449b5510217f83479c5a028986c569f54084c
Reviewed-by: Ivan Solovev <[email protected]>
Reviewed-by: Edward Welbourne <[email protected]>
(cherry picked from commit e6f5161)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>1 parent 39a6361 commit de2e570
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
0 commit comments