Bug 1391855 - OTS: Match signedness in GlatEntry loop. r=jfkthame
authorKevin Hsieh <kevin.hsieh@ucla.edu>
Sat, 19 Aug 2017 15:26:11 -0700
changeset 649607 9922fa33c5be7ad571f5f1c097befe04b13b66a8
parent 649606 16562a4d142441f6a4a7243bd3e14eeb6e2c1383
child 649608 1ba1737b4878853c1f23856b92450978b8e6c3de
push id75073
push userbmo:mozilla@hocat.ca
push dateSun, 20 Aug 2017 22:21:51 +0000
reviewersjfkthame
bugs1391855
milestone57.0a1
Bug 1391855 - OTS: Match signedness in GlatEntry loop. r=jfkthame MozReview-Commit-ID: IzzWbNVEwh
gfx/ots/README.mozilla
gfx/ots/src/glat.cc
--- a/gfx/ots/README.mozilla
+++ b/gfx/ots/README.mozilla
@@ -1,12 +1,12 @@
 This is the Sanitiser for OpenType project, from http://code.google.com/p/ots/.
 
 Our reference repository is https://github.com/khaledhosny/ots/.
 
-Current revision: 57ef618b11aa0409637af04988ccce7e6b92ed0f (5.2.0)
+Current revision: e2d4b5daba24e746a48d240e90d92fe09a20b681 (5.2.0)
 
 Upstream files included: LICENSE, src/, include/, tests/*.cc
 
 Additional files: README.mozilla, src/moz.build
 
 Additional patch: ots-visibility.patch (bug 711079).
 Additional patch: ots-lz4.patch
--- a/gfx/ots/src/glat.cc
+++ b/gfx/ots/src/glat.cc
@@ -69,17 +69,17 @@ bool OpenTypeGLAT_v1::GlatEntry::ParsePa
   if (!table.ReadU8(&this->attNum)) {
     return parent->Error("GlatEntry: Failed to read attNum");
   }
   if (!table.ReadU8(&this->num)) {
     return parent->Error("GlatEntry: Failed to read num");
   }
 
   //this->attributes.resize(this->num);
-  for (unsigned i = 0; i < this->num; ++i) {
+  for (int i = 0; i < this->num; ++i) {
     this->attributes.emplace_back();
     if (!table.ReadS16(&this->attributes[i])) {
       return parent->Error("GlatEntry: Failed to read attribute %u", i);
     }
   }
   return true;
 }
 
@@ -151,17 +151,17 @@ bool OpenTypeGLAT_v2::GlatEntry::ParsePa
   if (!table.ReadS16(&this->attNum)) {
     return parent->Error("GlatEntry: Failed to read attNum");
   }
   if (!table.ReadS16(&this->num) || this->num < 0) {
     return parent->Error("GlatEntry: Failed to read valid num");
   }
 
   //this->attributes.resize(this->num);
-  for (unsigned i = 0; i < this->num; ++i) {
+  for (int i = 0; i < this->num; ++i) {
     this->attributes.emplace_back();
     if (!table.ReadS16(&this->attributes[i])) {
       return parent->Error("GlatEntry: Failed to read attribute %u", i);
     }
   }
   return true;
 }