mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Avoid an MSVC warning in sodium_base64_ENCODED_LEN macro
Reported by @valveri , thanks! Fixes #1526 Fixes #1527
This commit is contained in:
@@ -77,7 +77,7 @@ int sodium_hex2bin(unsigned char *const bin, const size_t bin_maxlen, const char
|
||||
#define sodium_base64_ENCODED_LEN(BIN_LEN, VARIANT) \
|
||||
(((BIN_LEN) / 3U) * 4U + \
|
||||
((((BIN_LEN) - ((BIN_LEN) / 3U) * 3U) | (((BIN_LEN) - ((BIN_LEN) / 3U) * 3U) >> 1)) & 1U) * \
|
||||
(4U - (~((((VARIANT) & 2U) >> 1) - 1U) & (3U - ((BIN_LEN) - ((BIN_LEN) / 3U) * 3U)))) + \
|
||||
(4U - ((0U - (((VARIANT) & 2U) >> 1)) & (3U - ((BIN_LEN) - ((BIN_LEN) / 3U) * 3U)))) + \
|
||||
1U)
|
||||
|
||||
SODIUM_EXPORT
|
||||
|
||||
Reference in New Issue
Block a user