dwrite: Fix offsets when stepping through chain rule fields.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-06-01 12:23:36 +03:00 committed by Alexandre Julliard
parent e7324209e0
commit db6c4156af
1 changed files with 5 additions and 3 deletions

View File

@ -5180,10 +5180,12 @@ static BOOL opentype_layout_apply_chain_rule_set(const struct match_context *mc,
backtrack = table_read_ensure(table, rule_offset, backtrack_count * sizeof(*backtrack)); backtrack = table_read_ensure(table, rule_offset, backtrack_count * sizeof(*backtrack));
rule_offset += backtrack_count * sizeof(*backtrack); rule_offset += backtrack_count * sizeof(*backtrack);
input_count = table_read_be_word(table, rule_offset); if (!(input_count = table_read_be_word(table, rule_offset)))
continue;
rule_offset += 2; rule_offset += 2;
input = table_read_ensure(table, rule_offset, input_count * sizeof(*input)); input = table_read_ensure(table, rule_offset, (input_count - 1) * sizeof(*input));
rule_offset += input_count * sizeof(*input); rule_offset += (input_count - 1) * sizeof(*input);
lookahead_count = table_read_be_word(table, rule_offset); lookahead_count = table_read_be_word(table, rule_offset);
rule_offset += 2; rule_offset += 2;