mirror of
https://github.com/taglib/taglib.git
synced 2025-06-04 01:28:21 -04:00
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:
parent
fb0d6c5b4e
commit
962756461c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user