switch idea invmod too big to subtraction

This commit is contained in:
toddouska 2015-09-28 15:24:32 -07:00
parent 292e05dc75
commit 28912621ec
1 changed files with 2 additions and 1 deletions

View File

@ -106,7 +106,8 @@ static INLINE word16 idea_invmod(word16 x)
d += IDEA_MODULO;
/* d must be < IDEA_MODULO */
d %= IDEA_MODULO;
while (d >= (int)IDEA_MODULO)
d -= IDEA_MODULO;
return (word16)(d & IDEA_MASK);
}