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,13 +62,13 @@ public:
}
long APELocation;
unsigned int APESize;
long APESize;
long ID3v1Location;
ID3v2::Header *ID3v2Header;
long ID3v2Location;
unsigned int ID3v2Size;
long ID3v2Size;
TagUnion tag;
@ -193,7 +193,7 @@ bool MPC::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();
}