Avoid the risk of subtracting between signed and unsigned types.

This commit is contained in:
Tsuda Kageyu
2015-12-21 11:44:25 +09:00
parent cf5d431d77
commit d0238ba82f
6 changed files with 19 additions and 19 deletions

View File

@ -62,7 +62,7 @@ public:
}
long APELocation;
unsigned int APESize;
long APESize;
long ID3v1Location;
@ -174,7 +174,7 @@ bool WavPack::File::save()
insert(data, d->APELocation, d->APESize);
if(d->ID3v1Location >= 0)
d->ID3v1Location += (data.size() - d->APESize);
d->ID3v1Location += (static_cast<long>(data.size()) - d->APESize);
d->APESize = data.size();
}