Bug 1295299 - Cherry-pick harfbuzz fix 44f7d6ecde9bf7427a05cbe73ed5d668b8a72b2a. r=jrmuizel

This commit is contained in:
Jonathan Kew 2017-02-22 09:17:50 +00:00
Родитель 4ad1529674
Коммит 2fd356c331
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -959,7 +959,7 @@ static inline bool apply_lookup (hb_apply_context_t *c,
TRACE_APPLY (NULL);
hb_buffer_t *buffer = c->buffer;
unsigned int end;
int end;
/* All positions are distance from beginning of *output* buffer.
* Adjust. */
@ -998,8 +998,8 @@ static inline bool apply_lookup (hb_apply_context_t *c,
/* Recursed lookup changed buffer len. Adjust. */
end = int (end) + delta;
if (end <= match_positions[idx])
end += delta;
if (end <= int (match_positions[idx]))
{
/* End might end up being smaller than match_positions[idx] if the recursed
* lookup ended up removing many items, more than we have had matched.