Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: src/core/SkEdge.h

Issue 1503423003: ubsan shift fixes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/core/SkEdge.h
diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h
index db6f43085dadf88bd4b28cd128a2280d86935d92..803651be725038a27776647a9755cc7f45141494 100644
--- a/src/core/SkEdge.h
+++ b/src/core/SkEdge.h
@@ -15,7 +15,7 @@
#include "SkMath.h"
// This correctly favors the lower-pixel when y0 is on a 1/2 pixel boundary
-#define SkEdge_Compute_DY(top, y0) ((top << 6) + 32 - (y0))
+#define SkEdge_Compute_DY(top, y0) (top * (1 << 6) + 32 - (y0))
struct SkEdge {
enum Type {

Powered by Google App Engine
This is Rietveld 408576698