mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
Fix ID3v2 padding size calculation.
This commit is contained in:
parent
d80c4c96c3
commit
1a917a38cd
@ -608,9 +608,11 @@ ByteVector ID3v2::Tag::render(int version) const
|
||||
|
||||
// Padding won't increase beyond 1% of the file size.
|
||||
|
||||
const uint threshold = d->file->length() / 100; // should be ulonglong in taglib2.
|
||||
if(paddingSize > d->paddingSize && paddingSize > threshold)
|
||||
paddingSize = DefaultPaddingSize;
|
||||
if(paddingSize > DefaultPaddingSize) {
|
||||
const uint threshold = d->file->length() / 100; // should be ulonglong in taglib2.
|
||||
if(paddingSize > threshold)
|
||||
paddingSize = DefaultPaddingSize;
|
||||
}
|
||||
}
|
||||
|
||||
tagData.append(ByteVector(paddingSize, '\0'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user