mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Fix isNameOf...() functions for case of string contains whitespaces only
This commit is contained in:
parent
9468f266f5
commit
ad705bd01e
|
@ -27,6 +27,9 @@ string simplifyString( string const & str )
|
|||
while( endPos && Utf8::isspace( str[ endPos - 1 ] ) )
|
||||
--endPos;
|
||||
|
||||
if( endPos <= beginPos )
|
||||
return string();
|
||||
|
||||
result.reserve( endPos - beginPos );
|
||||
|
||||
while( beginPos < endPos )
|
||||
|
|
Loading…
Reference in a new issue