aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-06-15 14:26:53 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2011-06-15 14:26:53 +0300
commit3340ce32eb576ff355b83fc78a189b897b7fc424 (patch)
treead2046a4ce2965d5d420bd922345f30736a266c4
parent84e02fbf55ba1e92167a4cdc8518e1bebd69079c (diff)
downloadellinika-3340ce32eb576ff355b83fc78a189b897b7fc424.tar.gz
ellinika-3340ce32eb576ff355b83fc78a189b897b7fc424.tar.bz2
Bugfix
* src/ellinika/syllabificator.c (next_syllable): Fix coredump on final iota.
-rw-r--r--src/ellinika/syllabificator.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ellinika/syllabificator.c b/src/ellinika/syllabificator.c
index e034163..97d3ce7 100644
--- a/src/ellinika/syllabificator.c
+++ b/src/ellinika/syllabificator.c
@@ -91,12 +91,14 @@ next_syllable(struct syllabificator *sp)
if (ISIOTA(sp->phon[sp->phon_cur])) {
/* incorporate iota */;
syl->char_count += sp->phon[sp->phon_cur].count;
syl->phoneme_count++;
sp->phon_cur++;
+ if (sp->phon_cur == sp->phon_max)
+ return 0;
if (sp->phon[sp->phon_cur].flags & CHF_VOWEL)
syl->flags |= CHF_DIPHTHONG|CHF_IOTA;
}
if (sp->phon[sp->phon_cur].flags & CHF_VOWEL)
syl->flags |= sp->phon[sp->phon_cur].flags & CHF_ACCENT_MASK;

Return to:

Send suggestions and report system problems to the System administrator.