mirror of
https://github.com/taglib/taglib.git
synced 2025-07-26 00:44:31 -04:00
A bit more tolerant check to return itself in String::substr().
This commit is contained in:
@ -447,7 +447,7 @@ bool String::startsWith(const String &s) const
|
||||
|
||||
String String::substr(unsigned int position, unsigned int n) const
|
||||
{
|
||||
if(position == 0 && n == size())
|
||||
if(position == 0 && n >= size())
|
||||
return *this;
|
||||
else
|
||||
return String(d->data.substr(position, n));
|
||||
|
Reference in New Issue
Block a user