Fix crash: SSML when <voice name=""> has an unrecognised voice name.

SSML: Don't speak text within <metadata> </metadata>


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@145 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2008-02-21 17:47:43 +00:00
parent b29b232e15
commit 134f750277
3 changed files with 20 additions and 3 deletions
+9 -2
View File
@@ -1221,8 +1221,8 @@ static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices, int
static espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name)
{//============================================================================
espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name)
{//=====================================================================
int ix;
int match_fname = -1;
int match_fname2 = -1;
@@ -1231,6 +1231,13 @@ static espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name)
int last_part_len;
char last_part[41];
if(voices == NULL)
{
if(n_voices_list == 0)
espeak_ListVoices(NULL); // create the voices list
voices = voices_list;
}
sprintf(last_part,"%c%s",PATHSEP,name);
last_part_len = strlen(last_part);