mirror of
https://github.com/taglib/taglib.git
synced 2025-06-03 00:58:12 -04:00
Don't dereference the iterator before checking its validity.
CCMAIL:taglib-devel@kde.org git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@594940 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
parent
245a8af778
commit
7892e7c9df
@ -434,8 +434,9 @@ String String::stripWhiteSpace() const
|
||||
wstring::const_iterator begin = d->data.begin();
|
||||
wstring::const_iterator end = d->data.end();
|
||||
|
||||
while(*begin == '\t' || *begin == '\n' || *begin == '\f' ||
|
||||
*begin == '\r' || *begin == ' ' && begin != end)
|
||||
while(begin != end &&
|
||||
(*begin == '\t' || *begin == '\n' || *begin == '\f' ||
|
||||
*begin == '\r' || *begin == ' '))
|
||||
{
|
||||
++begin;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user