Fixed String::GetWordPosition
Former-commit-id: df701345b94a899f91d4f67d270b2da20c23e904
This commit is contained in:
parent
4ebd391e05
commit
ce6902d37c
|
|
@ -2447,9 +2447,11 @@ unsigned int NzString::GetWordPosition(unsigned int index, nzUInt32 flags) const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (ptr != &m_sharedString->string[m_sharedString->size])
|
do
|
||||||
{
|
{
|
||||||
if (!std::isspace(*ptr++))
|
if (std::isspace(*ptr))
|
||||||
|
inWord = false;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (!inWord)
|
if (!inWord)
|
||||||
{
|
{
|
||||||
|
|
@ -2458,9 +2460,8 @@ unsigned int NzString::GetWordPosition(unsigned int index, nzUInt32 flags) const
|
||||||
return ptr - m_sharedString->string;
|
return ptr - m_sharedString->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
inWord = false;
|
|
||||||
}
|
}
|
||||||
|
while (*++ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
return npos;
|
return npos;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue