From 7c8a4c37ecd6e0d79b3135ae1bc8a7936b0b0fe9 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Mon, 29 Aug 2016 07:47:51 +0200 Subject: [PATCH] Fix Base128 encoding. --- src/Utils/String.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils/String.cpp b/src/Utils/String.cpp index cba41fa9..a9ab39d1 100644 --- a/src/Utils/String.cpp +++ b/src/Utils/String.cpp @@ -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(static_cast(input.data())), input.size()); + void* inbuffer = const_cast(input.data()); + char* buffer = encoder->encode(inbuffer, input.size()); delete encoder; return std::string(buffer); }