Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2018-10-03 11:00:09 +02:00
commit 9d702dbc78
2 changed files with 13 additions and 1 deletions

View file

@ -509,7 +509,12 @@ namespace EBML{
return val;
}
std::string Element::getValString() const{return std::string(getPayload(), getPayloadLen());}
std::string Element::getValString() const{
uint64_t strLen = getPayloadLen();
const char * strPtr = getPayload();
while (strLen && strPtr[strLen-1] == 0){--strLen;}
return std::string(strPtr, strLen);
}
uint64_t Block::getTrackNum() const{return UniInt::readInt(getPayload());}