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:
S6066 2018-08-01 23:12:02 +02:00 committed by Jérôme Leclercq
parent 271f7202ed
commit 4a09de7e0b
2 changed files with 4 additions and 3 deletions

View File

@ -127,6 +127,7 @@ Nazara Engine:
- ⚠️ Fixed compilation errors on MSVC with flag /permissive- on CullingList class
- Added LuaImplQueryArg & LuaImplReplyVal functions for Vector[2|3]<int>
- Fixed bug in ENet implementation causing legit reliable packets to be dropped on sequence number overflow
- Fixed bug where index wouldn't be used in String::FindLast and String::FindWord
Nazara Development Kit:
- Added ImageWidget (#139)

View File

@ -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)