aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/SkNx.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkNx.h b/src/core/SkNx.h
index d968cad19f..1342266b93 100644
--- a/src/core/SkNx.h
+++ b/src/core/SkNx.h
@@ -184,7 +184,7 @@ public:
SkNi saturatedAdd(const SkNi& o) const {
SkASSERT((T)(~0) > 0); // TODO: support signed T
T sum = fVal + o.fVal;
- return SkNi(sum > fVal ? sum : (T)(~0));
+ return SkNi(sum < fVal ? (T)(~0) : sum);
}
SkNi operator + (const SkNi& o) const { return SkNi(fVal + o.fVal); }