Browse Source

MatchRule: Also check for \0 in dot backtracking (#2088)

master
Samuel Thibault 5 months ago
parent
commit
91030d284e
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/libespeak-ng/dictionary.c

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

@@ -1978,13 +1978,13 @@ static void MatchRule(Translator *tr, char *word[], char *word_start, int group_
break;
case '.':
// dot in pre- section, match on any dot before this point in the word
for (p = pre_ptr; *p != ' '; p--) {
for (p = pre_ptr; *p && *p != ' '; p--) {
if (*p == '.') {
add_points = 50;
break;
}
}
if (*p == ' ')
if (!*p || *p == ' ')
failed = 1;
break;
case '-':

Loading…
Cancel
Save