aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/serpent_simd
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/serpent_simd
parent238869aed29c3d703650ce55404929dc7e3f31fb (diff)
Only call the scalar versions if we actually have leftover blocks to
process
Diffstat (limited to 'src/block/serpent_simd')
-rw-r--r--src/block/serpent_simd/serp_simd.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/block/serpent_simd/serp_simd.cpp b/src/block/serpent_simd/serp_simd.cpp
index ba587e93d..c64514de1 100644
--- a/src/block/serpent_simd/serp_simd.cpp
+++ b/src/block/serpent_simd/serp_simd.cpp
@@ -188,7 +188,8 @@ void Serpent_SIMD::encrypt_n(const byte in[], byte out[], u32bit blocks) const
blocks -= 4;
}
- Serpent::encrypt_n(in, out, blocks);
+ if(blocks)
+ Serpent::encrypt_n(in, out, blocks);
}
/*
@@ -204,7 +205,8 @@ void Serpent_SIMD::decrypt_n(const byte in[], byte out[], u32bit blocks) const
blocks -= 4;
}
- Serpent::decrypt_n(in, out, blocks);
+ if(blocks)
+ Serpent::decrypt_n(in, out, blocks);
}
}