Fix off-by one error in decoder and make padding deterministic.

This commit is contained in:
Patrick Niklaus
2015-09-14 23:01:38 +02:00
parent fe0fe1873a
commit 8e02263084
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ struct ObjectEncoder
replaceAll(encoded, "-", "+");
replaceAll(encoded, "_", "/");
std::copy(binary_t(encoded.begin()), binary_t(encoded.begin() + encoded.length() - 1),
std::copy(binary_t(encoded.begin()), binary_t(encoded.begin() + encoded.length()),
reinterpret_cast<char *>(&object));
}
catch (...)