From: Behdad Esfahbod Date: Thu, 11 Oct 2018 14:30:32 +0000 (-0400) Subject: [trak] Fix counting X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=451f3de521ff1b7f4d3b8ebb2cc0b95d88c9314a;p=platform%2Fupstream%2FlibHarfBuzzSharp.git [trak] Fix counting --- diff --git a/src/hb-aat-layout-trak-table.hh b/src/hb-aat-layout-trak-table.hh index 9054922..63dd890 100644 --- a/src/hb-aat-layout-trak-table.hh +++ b/src/hb-aat-layout-trak-table.hh @@ -95,10 +95,9 @@ struct TrackData /* XXX Clean this up. Make it work with nSizes==1 and 0. */ - unsigned int sizes = nSizes; - const TrackTableEntry *trackTableEntry = nullptr; - for (unsigned int i = 0; i < sizes; i++) + unsigned int count = nTracks; + for (unsigned int i = 0; i < count; i++) { /* Note: Seems like the track entries are sorted by values. But the * spec doesn't explicitly say that. It just mentions it in the example. */ @@ -111,9 +110,10 @@ struct TrackData break; } } - if (!trackTableEntry) return 0.; + unsigned int sizes = nSizes; + /* TODO bfind() */ unsigned int size_index; UnsizedArrayOf size_table = base+sizeTable;