idea_mult() now works on 16,32, AND 64bit systems

This commit is contained in:
toddouska
2015-11-12 10:32:35 -08:00
parent d9cb1cfbe1
commit 261fedd906

View File

@@ -44,12 +44,11 @@
*/
static INLINE word16 idea_mult(word16 x, word16 y)
{
word32 mul;
long res;
long mul, res;
mul = (word32)x * (word32)y;
mul = (long)x * (long)y;
if (mul) {
res = (mul & IDEA_MASK) - (mul >> 16);
res = (mul & IDEA_MASK) - ((word32)mul >> 16);
if (res <= 0)
res += IDEA_MODULO;