aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/idea_sse2
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-22 13:54:18 +0000
committerlloyd <[email protected]>2010-06-22 13:54:18 +0000
commit6d9ad105f26ce29b15a3d2a1dc8d3f842bc281b0 (patch)
tree89d656e974f4520c04b9f58039b4493bf6196a49 /src/block/idea_sse2
parent238869aed29c3d703650ce55404929dc7e3f31fb (diff)
Only call the scalar versions if we actually have leftover blocks to
process
Diffstat (limited to 'src/block/idea_sse2')
-rw-r--r--src/block/idea_sse2/idea_sse2.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/block/idea_sse2/idea_sse2.cpp b/src/block/idea_sse2/idea_sse2.cpp
index 0948bf46a..a7ded37e1 100644
--- a/src/block/idea_sse2/idea_sse2.cpp
+++ b/src/block/idea_sse2/idea_sse2.cpp
@@ -204,7 +204,8 @@ void IDEA_SSE2::encrypt_n(const byte in[], byte out[], u32bit blocks) const
blocks -= 8;
}
- IDEA::encrypt_n(in, out, blocks);
+ if(blocks)
+ IDEA::encrypt_n(in, out, blocks);
}
/*
@@ -220,7 +221,8 @@ void IDEA_SSE2::decrypt_n(const byte in[], byte out[], u32bit blocks) const
blocks -= 8;
}
- IDEA::decrypt_n(in, out, blocks);
+ if(blocks)
+ IDEA::decrypt_n(in, out, blocks);
}
}