Index: src/core/SkNx.h |
diff --git a/src/core/SkNx.h b/src/core/SkNx.h |
index d968cad19f6c687b6ef41720425dbe22ddb1fbe2..1342266b934f9c007062323a677a5d6bf904a0e6 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); } |