mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -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:
@ -238,7 +238,7 @@ void Ogg::PageHeader::read()
|
||||
// Sanity check -- make sure that we were in fact able to read as much data as
|
||||
// we asked for and that the page begins with "OggS".
|
||||
|
||||
if(data.size() != 27 || data.mid(0, 4) != "OggS") {
|
||||
if(data.size() != 27 || !data.startsWith("OggS")) {
|
||||
debug("Ogg::PageHeader::read() -- error reading page header");
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user