Browse Source

Fix calling utf8_in2

utf8_in2, when working in backward mode, is assuming that we are giving
the address of the last byte of the previous character (see all other
calls to utf8_in2). Otherwise, utf8_in2 returns the size of the current
multibyte character instead of that of the previous multibyte character.
master
Samuel Thibault 2 years ago
parent
commit
3c220e5831
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/libespeak-ng/dictionary.c

+ 1
- 1
src/libespeak-ng/dictionary.c View File

@@ -2084,7 +2084,7 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
failed = 1;
break;
}
p -= utf8_in2(&letter_w, p, 1);
p -= utf8_in2(&letter_w, p-1, 1);
}
if (!failed)
add_points = 3;

Loading…
Cancel
Save