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

Unified Diff: third_party/woff2/src/glyph.cc

Issue 1873123002: Update woff2 to 4e698b8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: assert.h Created 4 years, 8 months 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: third_party/woff2/src/glyph.cc
diff --git a/third_party/woff2/src/glyph.cc b/third_party/woff2/src/glyph.cc
index 4cef0d9be828f357a221fa47a5cec86b31254fbf..17bef382cd46e078936658e8871b6962b9333f61 100644
--- a/third_party/woff2/src/glyph.cc
+++ b/third_party/woff2/src/glyph.cc
@@ -78,11 +78,6 @@ bool ReadGlyph(const uint8_t* data, size_t len, Glyph* glyph) {
return FONT_COMPRESSION_FAILURE();
}
- if (num_contours == 0) {
- // Empty glyph.
- return true;
- }
-
// Read the bounding box.
if (!buffer.ReadS16(&glyph->x_min) ||
!buffer.ReadS16(&glyph->y_min) ||
@@ -91,6 +86,11 @@ bool ReadGlyph(const uint8_t* data, size_t len, Glyph* glyph) {
return FONT_COMPRESSION_FAILURE();
}
+ if (num_contours == 0) {
+ // Empty glyph.
+ return true;
+ }
+
if (num_contours > 0) {
// Simple glyph.
glyph->contours.resize(num_contours);

Powered by Google App Engine
This is Rietveld 408576698