summaryrefslogtreecommitdiff
path: root/idea.c
diff options
context:
space:
mode:
Diffstat (limited to 'idea.c')
-rw-r--r--idea.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/idea.c b/idea.c
index 19d5faa..ffa51ac 100644
--- a/idea.c
+++ b/idea.c
@@ -137,11 +137,9 @@ DoIDEA(void)
** # of loops and increasing the loop count until we
** get a number of loops that we can use.
*/
- for (; loops < LOOP_MAX; loops += 10) {
- if (DoIDEAIteration(plain1, crypt1, plain2, loops, Z, DK) > MINIMUM_TICKS) {
- break;
- }
- }
+ do {
+ loops += 10;
+ } while((DoIDEAIteration(plain1, crypt1, plain2, loops, Z, DK) <= MINIMUM_TICKS) && (loops < LOOP_MAX));
}
/*