From 0b244ba4a54c7942e3bfef3778d96ec15c593b7e Mon Sep 17 00:00:00 2001 From: jonsd Date: Thu, 13 Mar 2008 01:24:55 +0000 Subject: [PATCH] [1.36.02] Fix for crash on word with abnormally large number of vowels (eg "Hiiiiii.....") git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@167 d46cf337-b52f-0410-862d-fd96e6ae7743 --- src/dictionary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dictionary.cpp b/src/dictionary.cpp index a6aecb7a..a82f74bd 100755 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp @@ -805,7 +805,7 @@ static int GetVowelStress(Translator *tr, unsigned char *phonemes, unsigned char int primary_posn = 0; vowel_stress[0] = 0; - while((phcode = *phonemes++) != 0) + while(((phcode = *phonemes++) != 0) && (count < (N_WORD_PHONEMES/2)-1)) { if((ph = phoneme_tab[phcode]) == NULL) continue;