mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
fix one of the checks, don't cast this to a value over 255
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@773877 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
e4f7a9ec1e
commit
ddaf3cc479
@ -116,7 +116,7 @@ namespace TagLib {
|
||||
lastOccurrence[i] = uchar(pattern.size());
|
||||
|
||||
for(uint i = 0; i < pattern.size() - 1; ++i)
|
||||
lastOccurrence[unsigned(pattern[i])] = uchar(pattern.size() - i - 1);
|
||||
lastOccurrence[uchar(pattern[i])] = uchar(pattern.size() - i - 1);
|
||||
|
||||
for(uint i = pattern.size() - 1 + offset; i < v.size(); i += lastOccurrence[uchar(v.at(i))]) {
|
||||
int iBuffer = i;
|
||||
@ -430,8 +430,8 @@ ByteVector &ByteVector::replace(const ByteVector &pattern, const ByteVector &wit
|
||||
|
||||
int offset = find(pattern);
|
||||
|
||||
while(offset >= 0)
|
||||
{
|
||||
while(offset >= 0) {
|
||||
|
||||
const int originalSize = size();
|
||||
|
||||
if(withSize > patternSize)
|
||||
|
Loading…
Reference in New Issue
Block a user