mirror of
https://github.com/taglib/taglib.git
synced 2026-02-12 11:12:58 -05: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