Merge pull request #5152 from harfbuzz/fix-trak-finding

[trak] Fix track finding logic
This commit is contained in:
Behdad Esfahbod authored and GitHub committed 2025-03-16 17:30:57 -06:00
commit bd2bf3536c
1 file changed
+2 -2
+2 -2
View File
@@ -142,9 +142,9 @@ struct TrackData
unsigned j = count - 1;
// Find the two entries that track is between.
while (i + 1 < count && trackTable[i + 1].get_track_value () < track)
while (i + 1 < count && trackTable[i + 1].get_track_value () <= track)
i++;
while (j > 0 && trackTable[j - 1].get_track_value () > track)
while (j > 0 && trackTable[j - 1].get_track_value () >= track)
j--;
// Exact match.