diff options
Diffstat (limited to 'pw_phonemes.c')
| -rw-r--r-- | pw_phonemes.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/pw_phonemes.c b/pw_phonemes.c index 57633c3..255ee57 100644 --- a/pw_phonemes.c +++ b/pw_phonemes.c @@ -90,6 +90,14 @@ try_again: /* Don't allow us to overflow the buffer */ if (len > size-c) continue; + + /* Handle the AMBIGUOUS flag */ + if (pw_flags & PW_AMBIGUOUS) { + cp = strpbrk(str, pw_ambiguous); + if (cp) + continue; + } + /* * OK, we found an element which matches our criteria, * let's do it! @@ -107,15 +115,6 @@ try_again: c += len; - /* Handle the AMBIGUOUS flag */ - if (pw_flags & PW_AMBIGUOUS) { - cp = strpbrk(buf, pw_ambiguous); - if (cp) { - *cp = 0; - c = strlen(buf); - } - } - /* Time to stop? */ if (c >= size) break; |