Fix Base128 encoding.

This commit is contained in:
/dev/urandom 2016-08-29 07:47:51 +02:00
parent 9fdf7b9b38
commit 7c8a4c37ec
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -135,7 +135,8 @@ namespace Utils
// Encodes a given string in Base128
std::string EncodeBase128(const std::string& input) {
auto encoder = new base128();
auto buffer = encoder->encode(const_cast<void*>(static_cast<const void*>(input.data())), input.size());
void* inbuffer = const_cast<char*>(input.data());
char* buffer = encoder->encode(inbuffer, input.size());
delete encoder;
return std::string(buffer);
}