aboutsummaryrefslogtreecommitdiff
path: root/pw_phonemes.c
diff options
context:
space:
mode:
authorPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:22 +0200
committerPhilipp Klaus <philipp.klaus@gmail.com>2011-06-21 17:12:22 +0200
commit83963510edc09860c8e1b765e4e3c9254507ecde (patch)
treeedfc92c14a34371680c19606f254cfa7e38d1de2 /pw_phonemes.c
parentf6085cae15588228695eba6f7e0c2a490641bff9 (diff)
downloadpwgen-83963510edc09860c8e1b765e4e3c9254507ecde.zip
automatic commit for pwgen-2.06
Diffstat (limited to 'pw_phonemes.c')
-rw-r--r--pw_phonemes.c17
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;