forked from qt-creator/qt-creator
Botan: Fix warning
GCC 4.7 warns about casting from (unsigned) byte to (signed) char Change-Id: I00f3a5159e6471b8d43c122350fa223a3b14f5df Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
committed by
Christian Kandeler
parent
e9f5d047bc
commit
dbd3917bbe
10
src/libs/3rdparty/botan/botan.cpp
vendored
10
src/libs/3rdparty/botan/botan.cpp
vendored
@@ -33386,20 +33386,18 @@ BigInt BigInt::decode(const byte buf[], size_t length, Base base)
|
||||
else if(base == Hexadecimal)
|
||||
{
|
||||
SecureVector<byte> binary;
|
||||
const char *cbuf = reinterpret_cast<const char *>(buf);
|
||||
|
||||
if(length % 2)
|
||||
{
|
||||
// Handle lack of leading 0
|
||||
const char buf0_with_leading_0[2] = { '0', buf[0] };
|
||||
const char buf0_with_leading_0[2] = { '0', cbuf[0] };
|
||||
binary = hex_decode(buf0_with_leading_0, 2);
|
||||
|
||||
binary += hex_decode(reinterpret_cast<const char*>(&buf[1]),
|
||||
length - 1,
|
||||
false);
|
||||
binary += hex_decode(&cbuf[1], length - 1, false);
|
||||
}
|
||||
else
|
||||
binary = hex_decode(reinterpret_cast<const char*>(buf),
|
||||
length, false);
|
||||
binary = hex_decode(cbuf, length, false);
|
||||
|
||||
r.binary_decode(&binary[0], binary.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user