Fix Base128 encoding.
This commit is contained in:
parent
9fdf7b9b38
commit
7c8a4c37ec
@ -135,7 +135,8 @@ namespace Utils
|
|||||||
// Encodes a given string in Base128
|
// Encodes a given string in Base128
|
||||||
std::string EncodeBase128(const std::string& input) {
|
std::string EncodeBase128(const std::string& input) {
|
||||||
auto encoder = new base128();
|
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;
|
delete encoder;
|
||||||
return std::string(buffer);
|
return std::string(buffer);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user