diff --git a/headers/streamvariablebyte.h b/headers/streamvariablebyte.h index dd1cbd1..a85252f 100644 --- a/headers/streamvariablebyte.h +++ b/headers/streamvariablebyte.h @@ -51,6 +51,8 @@ class StreamVByte : public IntegerCODEC { count, std::numeric_limits::max())), 0, 1); nvalue = static_cast(bytesWritten + 3) / 4; + for (size_t i = bytesWritten; i < nvalue*4; ++i) + ((uint8_t*)out)[i] = 0; } const uint32_t *decodeArray(const uint32_t *in, const size_t /* count */,