diff --git a/taglib/toolkit/tbytevectorstream.cpp b/taglib/toolkit/tbytevectorstream.cpp index a01da552..dc480a26 100644 --- a/taglib/toolkit/tbytevectorstream.cpp +++ b/taglib/toolkit/tbytevectorstream.cpp @@ -81,7 +81,7 @@ ByteVector ByteVectorStream::readBlock(ulong length) void ByteVectorStream::writeBlock(const ByteVector &data) { uint size = data.size(); - if(d->position + size > length()) { + if(long(d->position + size) > length()) { truncate(d->position + size); } memcpy(d->data.data() + d->position, data.data(), size);