[1.29.20] Fix for crash in Chinese text.

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@104 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2007-11-13 02:28:05 +00:00
parent f9725f9f64
commit e87bb29b27
11 changed files with 27 additions and 17 deletions
+3 -2
View File
@@ -203,6 +203,7 @@ int Translator::TranslateRoman(char *word, char *ph_out)
{//=====================================================
int c;
char *p;
const char *p2;
int acc;
int prev;
int value;
@@ -219,10 +220,10 @@ int Translator::TranslateRoman(char *word, char *ph_out)
while((c = *word++) != ' ')
{
if((p = strchr(roman_numbers,c)) == NULL)
if((p2 = strchr(roman_numbers,c)) == NULL)
return(0);
value = roman_values[p - roman_numbers];
value = roman_values[p2 - roman_numbers];
if((prev==5) || (prev==50) || (prev==500))
{