This didn't work in the case of an empty buffer read since subtracting 1

from a unsigned value, well, left a lot of room at the end.


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@689729 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler 2007-07-19 00:04:37 +00:00
parent fb0d6c5b4e
commit 962756461c

View File

@ -473,7 +473,7 @@ long MPEG::File::nextFrameOffset(long position)
seek(position);
buffer = readBlock(bufferSize());
for(uint i = 0; i < buffer.size() - 1; i++) {
for(int i = 0; i < int(buffer.size()) - 1; i++) {
if(uchar(buffer[i]) == 0xff && secondSynchByte(buffer[i + 1]))
return position + i;
}