mirror of
https://github.com/taglib/taglib.git
synced 2025-07-19 13:34:19 -04:00
startsWith() should be used to avoid bugs like: s.mid(0, 4) == "Foo".
git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@371832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -196,7 +196,7 @@ void ID3v1::Tag::read()
|
||||
ByteVector data = d->file->readBlock(128);
|
||||
|
||||
// some initial sanity checking
|
||||
if(data.size() == 128 && data.mid(0, 3) == "TAG")
|
||||
if(data.size() == 128 && data.startsWith("TAG"))
|
||||
parse(data);
|
||||
else
|
||||
debug("ID3v1 tag is not valid or could not be read at the specified offset.");
|
||||
|
Reference in New Issue
Block a user