mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
fix gcc compile warning in base64 encoder
This commit is contained in:
parent
c39223e226
commit
873d0549bf
1 changed files with 3 additions and 3 deletions
|
@ -30,9 +30,9 @@ void Base64Converter::Encode(int len, const unsigned char* data, int* pblen, cha
|
|||
|
||||
for ( int i = 0, j = 0; (i < len) && ( j < blen ); )
|
||||
{
|
||||
uint32_t bit32 = ((i < len ? data[i++] : 0) << 16) +
|
||||
((i < len ? data[i++] : 0 & i++) << 8) +
|
||||
( i < len ? data[i++] : 0 & i++);
|
||||
uint32_t bit32 = data[i++] << 16;
|
||||
bit32 += (i++ < len ? data[i-1] : 0) << 8;
|
||||
bit32 += i++ < len ? data[i-1] : 0;
|
||||
|
||||
buf[j++] = alphabet[(bit32 >> 18) & 0x3f];
|
||||
buf[j++] = alphabet[(bit32 >> 12) & 0x3f];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue