mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-12-05 08:00:36 +00:00
FindReplacementChars: Use an nc (next character) variable.
This commit is contained in:
@@ -1795,15 +1795,19 @@ static const char *FindReplacementChars(Translator *tr, const char **pfrom, unsi
|
|||||||
const char *from = *pfrom;
|
const char *from = *pfrom;
|
||||||
while (*(unsigned int *)from != 0) {
|
while (*(unsigned int *)from != 0) {
|
||||||
unsigned int fc = 0; // from character
|
unsigned int fc = 0; // from character
|
||||||
|
unsigned int nc = c; // next character
|
||||||
|
|
||||||
*pfrom = from;
|
*pfrom = from;
|
||||||
|
|
||||||
from += utf8_in((int *)&fc, from);
|
from += utf8_in((int *)&fc, from);
|
||||||
if (c == fc) {
|
if (nc == fc) {
|
||||||
if (*from == 0) return from + 1;
|
if (*from == 0) return from + 1;
|
||||||
|
|
||||||
from += utf8_in((int *)&fc, from);
|
from += utf8_in((int *)&fc, from);
|
||||||
if (*from == 0 && fc == (unsigned int)towlower2(nextc, tr)) {
|
nc = nextc;
|
||||||
|
|
||||||
|
nc = towlower2(nextc, tr);
|
||||||
|
if (*from == 0 && nc == fc) {
|
||||||
*ignore_next_n = 1;
|
*ignore_next_n = 1;
|
||||||
return from + 1;
|
return from + 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user