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

Unified Diff: src/woff2.cc

Issue 658573004: Updating to new OTS repo from https://github.com/khaledhosny/ots.git (Closed) Base URL: https://chromium.googlesource.com/external/ots@master
Patch Set: Adding Colored Emoji changes from external/git repo Created 6 years, 2 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
« .gitmodules ('K') | « src/vorg.cc ('k') | test/README » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/woff2.cc
diff --git a/src/woff2.cc b/src/woff2.cc
old mode 100644
new mode 100755
index 9cd96ff25268437c58dabd9ffb3127a8a819e38a..28e6a3695d3e90def96a6b05caf1f0473e08a1d4
--- a/src/woff2.cc
+++ b/src/woff2.cc
@@ -634,14 +634,14 @@ bool ReconstructGlyf(const uint8_t* data, size_t data_size,
}
StoreU16(glyf_dst, 0, n_contours);
ComputeBbox(points, glyf_dst);
- size_t offset = kEndPtsOfContoursOffset;
+ size_t endpts_offset = kEndPtsOfContoursOffset;
int end_point = -1;
for (unsigned int contour_ix = 0; contour_ix < n_contours; ++contour_ix) {
end_point += n_points_vec.at(contour_ix);
if (end_point >= 65536) {
return OTS_FAILURE();
}
- offset = StoreU16(glyf_dst, offset, static_cast<uint16_t>(end_point));
+ endpts_offset = StoreU16(glyf_dst, endpts_offset, static_cast<uint16_t>(end_point));
}
if (!flag_stream.Skip(flag_size)) {
return OTS_FAILURE();
@@ -870,7 +870,7 @@ bool ConvertWOFF2ToTTF(uint8_t* result, size_t result_length,
ots::Buffer file(data, length);
uint32_t signature;
- uint32_t flavor;
+ uint32_t flavor = 0;
if (!file.ReadU32(&signature) || signature != kWoff2Signature ||
!file.ReadU32(&flavor)) {
return OTS_FAILURE();
« .gitmodules ('K') | « src/vorg.cc ('k') | test/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698