diff --git a/src/libespeak-ng/numbers.c b/src/libespeak-ng/numbers.c index 5da8632e..780fa4e1 100644 --- a/src/libespeak-ng/numbers.c +++ b/src/libespeak-ng/numbers.c @@ -1719,13 +1719,14 @@ static bool CheckThousandsGroup(char *word, int group_len) // Is this a group of 3 digits which looks like a thousands group? int ix; - if (IsDigit09(word[group_len]) || IsDigit09(-1)) - return false; - for (ix = 0; ix < group_len; ix++) { if (!IsDigit09(word[ix])) return false; } + + if (IsDigit09(word[group_len]) || IsDigit09(-1)) + return false; + return true; } diff --git a/tests/translate.test b/tests/translate.test index 2f0d29e4..cf3a8be4 100755 --- a/tests/translate.test +++ b/tests/translate.test @@ -86,3 +86,6 @@ test_phon sk "bl'ax sm'eju:tsa s'a tv'a:R" "blah ☺" # bug: https://github.com/espeak-ng/espeak-ng/issues/853 test_phon fr "profEs'Wr" "PR" + +# https://github.com/espeak-ng/espeak-ng/pull/1148 +test_phon fr "dY mil v'E~" "2020"