diff --git a/src/sample.cpp b/src/sample.cpp index 3231e5a..65e70da 100644 --- a/src/sample.cpp +++ b/src/sample.cpp @@ -228,13 +228,15 @@ void Sample::SetOffset(uint32_t offset) uint32_t Sample::GetNextOffset() const { - return this->offset + + return static_cast( + this->offset + 1 + // length of the name (this->name.length() + 1) + // the name + '\0' this->size + // size of the data 1 + // the delimiter 1 + // length of the filename - (this->filename.length() + 1); // the filename + '\0' + (this->filename.length() + 1) // the filename + '\0' + ); } uint32_t Sample::GetOffset() const