Fix isNameOf...() functions for case of string contains whitespaces only

This commit is contained in:
Abs62 2018-03-19 17:42:30 +03:00
parent 9468f266f5
commit ad705bd01e

View file

@ -27,6 +27,9 @@ string simplifyString( string const & str )
while( endPos && Utf8::isspace( str[ endPos - 1 ] ) ) while( endPos && Utf8::isspace( str[ endPos - 1 ] ) )
--endPos; --endPos;
if( endPos <= beginPos )
return string();
result.reserve( endPos - beginPos ); result.reserve( endPos - beginPos );
while( beginPos < endPos ) while( beginPos < endPos )