summaryrefslogtreecommitdiffstats
path: root/CryptoPP/misc.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-25 22:07:38 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-25 22:07:38 +0100
commitf50c14f91b9d7488caa45b1ab9faeaa6d6028f41 (patch)
treeb0bf16acbf79e6fcd45e3eee4309249f53dd028d /CryptoPP/misc.h
parentRails don't turn grass into dirt underneath them. (Patch contributed by STR_Warrior) (diff)
downloadcuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.gz
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.bz2
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.lz
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.xz
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.tar.zst
cuberite-f50c14f91b9d7488caa45b1ab9faeaa6d6028f41.zip
Diffstat (limited to '')
-rw-r--r--CryptoPP/misc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/CryptoPP/misc.h b/CryptoPP/misc.h
index 8425c5362..7f32b860b 100644
--- a/CryptoPP/misc.h
+++ b/CryptoPP/misc.h
@@ -580,13 +580,13 @@ CRYPTOPP_DLL void CRYPTOPP_API UnalignedDeallocate(void *p);
template <class T> inline T rotlFixed(T x, unsigned int y)
{
assert(y < sizeof(T)*8);
- return T((x<<y) | (x>>(sizeof(T)*8-y)));
+ return y ? T((x<<y) | (x>>(sizeof(T)*8-y))) : x;
}
template <class T> inline T rotrFixed(T x, unsigned int y)
{
assert(y < sizeof(T)*8);
- return T((x>>y) | (x<<(sizeof(T)*8-y)));
+ return y ? T((x>>y) | (x<<(sizeof(T)*8-y))) : x;
}
template <class T> inline T rotlVariable(T x, unsigned int y)