String::FindLast/FindWord: Fix bug where index wouldn't be used (#177)
* String::FindLast/FindWord: Fix bug where index wouldn't be used * Log change
This commit is contained in:
@@ -976,7 +976,7 @@ namespace Nz
|
||||
if (pos >= m_sharedString->size)
|
||||
return npos;
|
||||
|
||||
char* ptr = &m_sharedString->string[m_sharedString->size-1];
|
||||
char* ptr = &m_sharedString->string[pos];
|
||||
|
||||
if (flags & CaseInsensitive)
|
||||
{
|
||||
@@ -1751,7 +1751,7 @@ namespace Nz
|
||||
return npos;
|
||||
|
||||
///Algo 3.FindWord#3 (Size of the pattern unknown)
|
||||
const char* ptr = m_sharedString->string.get();
|
||||
const char* ptr = &m_sharedString->string[pos];
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
if (utf8::internal::is_trail(*ptr))
|
||||
@@ -1931,7 +1931,7 @@ namespace Nz
|
||||
if (pos >= m_sharedString->size)
|
||||
return npos;
|
||||
|
||||
char* ptr = m_sharedString->string.get();
|
||||
char* ptr = &m_sharedString->string[pos];
|
||||
if (flags & HandleUtf8)
|
||||
{
|
||||
///Algo 3.FindWord#3 (Iterator too slow for #2)
|
||||
|
||||
Reference in New Issue
Block a user