Support zero-length addVL

This commit is contained in:
JoelKatz
2012-05-30 14:00:13 -07:00
parent 0faa7ea071
commit b9a15d416d

View File

@@ -279,7 +279,7 @@ int Serializer::addVL(const std::vector<unsigned char>& vector)
int Serializer::addVL(const void *ptr, int len)
{
int ret = addRaw(encodeVL(len));
addRaw(ptr, len);
if (len) addRaw(ptr, len);
return ret;
}