From cd33c4042a022a3e1dea32da4c5541d6ca568cf0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 15 Mar 2022 03:39:12 +0100 Subject: [PATCH] MatchRule: Do not go back before the pre-ptr pre_ptr is already one byte before the current letter, so we do not want to subtract 1 again. Otherwise this would for instance underflow word_iz of addPluralSuffixes. --- src/libespeak-ng/dictionary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libespeak-ng/dictionary.c b/src/libespeak-ng/dictionary.c index f93be021..cc1cd33d 100644 --- a/src/libespeak-ng/dictionary.c +++ b/src/libespeak-ng/dictionary.c @@ -2049,7 +2049,7 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_ break; case RULE_NOVOWELS: { - char *p = pre_ptr - letter_xbytes - 1; + char *p = pre_ptr - letter_xbytes; while (letter_w != RULE_SPACE) { if (IsLetter(tr, letter_w, LETTERGP_VOWEL2)) { failed = 1;