| 1 | | The "fix" is surely wrong (why did phoneme_tab[final_ph] become NULL in the |
|---|
| 2 | | first place?), but it does prevent the crash when using espeak with the |
|---|
| 3 | | Russian voice. |
|---|
| 4 | | diff -ur espeak-1.29-source.orig/src/dictionary.cpp espeak-1.29-source/src/dictionary.cpp |
|---|
| 5 | | --- espeak-1.29-source.orig/src/dictionary.cpp 2007-09-30 17:16:23.000000000 +0600 |
|---|
| 6 | | +++ espeak-1.29-source/src/dictionary.cpp 2007-09-30 17:17:12.000000000 +0600 |
|---|
| 7 | | @@ -1109,6 +1109,9 @@ |
|---|
| 8 | | stressed_syllable = vowel_count - 3; |
|---|
| 9 | | if(vowel_count < 16) |
|---|
| 10 | | { |
|---|
| 11 | | + if(phoneme_tab[final_ph] == NULL) |
|---|
| 12 | | + stressed_syllable = guess_ru[vowel_count]; |
|---|
| 13 | | + else |
|---|
| 14 | | if(phoneme_tab[final_ph]->type == phVOWEL) |
|---|
| 15 | | stressed_syllable = guess_ru_v[vowel_count]; |
|---|
| 16 | | else |
|---|
| | 1 | --- espeak-1.29-source/src/dictionary.cpp 2007-09-30 19:36:21.000000000 +0600 |
|---|
| | 2 | +++ espeak-1.29-source/src/dictionary.cpp 2007-09-30 18:29:51.000000000 +0600 |
|---|
| | 3 | @@ -966,6 +965,7 @@ |
|---|
| | 4 | if(phonetic[ix] == 0) |
|---|
| | 5 | break; |
|---|
| | 6 | } |
|---|
| | 7 | + if(ix == 0) return; |
|---|
| | 8 | final_ph = phonetic[ix-1]; |
|---|
| | 9 | |
|---|
| | 10 | max_output = output + (N_WORD_PHONEMES-3); /* check for overrun */ |
|---|
| | 11 | |
|---|