aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/loadstor.h
diff options
context:
space:
mode:
authorDan Brown <[email protected]>2016-04-27 11:53:30 -0700
committerDan Brown <[email protected]>2016-04-27 11:53:30 -0700
commitb55e9bca0c747154aeeb188df9a8a6eda6d65124 (patch)
treec51c4662acbc3d1f6296a9419d1b0ce11a0db2be /src/lib/utils/loadstor.h
parent4ad555977b03cb92dfac0b87a00febe4d8e7ff5e (diff)
Change calls to 'get_byte' to explicitly cast parameters and eliminate compiler warnings
Diffstat (limited to 'src/lib/utils/loadstor.h')
-rw-r--r--src/lib/utils/loadstor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/utils/loadstor.h b/src/lib/utils/loadstor.h
index a6c2b7969..9ae9fda0e 100644
--- a/src/lib/utils/loadstor.h
+++ b/src/lib/utils/loadstor.h
@@ -47,7 +47,7 @@ namespace Botan {
template<typename T> inline byte get_byte(size_t byte_num, T input)
{
return static_cast<byte>(
- input >> ((sizeof(T)-1-(byte_num&(sizeof(T)-1))) << 3)
+ input >> (((~byte_num)&(sizeof(T)-1)) << 3)
);
}