[morx] Fix memory access issue
If buffer was enlarged, info was being outdated. Fixes https://github.com/harfbuzz/harfbuzz/issues/1225
This commit is contained in:
parent
5a41cf6be6
commit
4831e615d1
|
@ -546,8 +546,6 @@ struct StateTableDriver
|
||||||
template <typename context_t>
|
template <typename context_t>
|
||||||
inline void drive (context_t *c)
|
inline void drive (context_t *c)
|
||||||
{
|
{
|
||||||
hb_glyph_info_t *info = buffer->info;
|
|
||||||
|
|
||||||
if (!c->in_place)
|
if (!c->in_place)
|
||||||
buffer->clear_output ();
|
buffer->clear_output ();
|
||||||
|
|
||||||
|
@ -556,7 +554,7 @@ struct StateTableDriver
|
||||||
for (buffer->idx = 0;;)
|
for (buffer->idx = 0;;)
|
||||||
{
|
{
|
||||||
unsigned int klass = buffer->idx < buffer->len ?
|
unsigned int klass = buffer->idx < buffer->len ?
|
||||||
machine.get_class (info[buffer->idx].codepoint, num_glyphs) :
|
machine.get_class (buffer->info[buffer->idx].codepoint, num_glyphs) :
|
||||||
(unsigned) StateTable<EntryData>::CLASS_END_OF_TEXT;
|
(unsigned) StateTable<EntryData>::CLASS_END_OF_TEXT;
|
||||||
const Entry<EntryData> *entry = machine.get_entryZ (state, klass);
|
const Entry<EntryData> *entry = machine.get_entryZ (state, klass);
|
||||||
if (unlikely (!entry))
|
if (unlikely (!entry))
|
||||||
|
|
Loading…
Reference in New Issue