Fix off-by-one error in ByteVectorList::split

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@994815 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Lukáš Lalinský
2009-07-11 13:24:21 +00:00
parent 5e1eb18df9
commit 39e6891c92
3 changed files with 40 additions and 1 deletions

View File

@ -52,7 +52,7 @@ ByteVectorList ByteVectorList::split(const ByteVector &v, const ByteVector &patt
offset != -1 && (max == 0 || max > int(l.size()) + 1);
offset = v.find(pattern, offset + pattern.size(), byteAlign))
{
if(offset - previousOffset > 1)
if(offset - previousOffset >= 1)
l.append(v.mid(previousOffset, offset - previousOffset));
else
l.append(ByteVector::null);