diff --git a/src/ustring.cpp b/src/ustring.cpp index 7cf54d8..14f6bc3 100755 --- a/src/ustring.cpp +++ b/src/ustring.cpp @@ -354,15 +354,13 @@ bool ustring::operator!=( const ustring& str ) const std::size_t ustring::find(char32_t symbol, std::size_t pos /* = 0 */) const { char32_t* pBuf = _pData + pos; - std::size_t result = 0; do { if(*pBuf == symbol) { - return (result + pos); + return (pBuf - _pData); } - ++result; } while(*pBuf++ != 0);