mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Avoid the risk of subtracting between signed and unsigned types.
This commit is contained in:
parent
130654316b
commit
5a1f44d166
@ -218,10 +218,10 @@ bool MPEG::File::save(int tags, bool stripOthers, int id3v2Version, bool duplica
|
||||
insert(data, d->ID3v2Location, d->ID3v2OriginalSize);
|
||||
|
||||
if(d->APELocation >= 0)
|
||||
d->APELocation += (data.size() - d->ID3v2OriginalSize);
|
||||
d->APELocation += (static_cast<long>(data.size()) - d->ID3v2OriginalSize);
|
||||
|
||||
if(d->ID3v1Location >= 0)
|
||||
d->ID3v1Location += (data.size() - d->ID3v2OriginalSize);
|
||||
d->ID3v1Location += (static_cast<long>(data.size()) - d->ID3v2OriginalSize);
|
||||
|
||||
d->ID3v2OriginalSize = data.size();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user