mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 08:30:35 +00:00
- FString fixes.
This commit is contained in:
parent
262e93db2b
commit
5952b79af5
1 changed files with 4 additions and 4 deletions
|
@ -843,7 +843,7 @@ void FString::StripLeftRight ()
|
|||
}
|
||||
for (j = max - 1; j >= i; --j)
|
||||
{
|
||||
if (Chars[i] < 0 || !isspace((unsigned char)Chars[j]))
|
||||
if (Chars[j] < 0 || !isspace((unsigned char)Chars[j]))
|
||||
break;
|
||||
}
|
||||
if (i == 0 && j == max - 1)
|
||||
|
@ -863,7 +863,7 @@ void FString::StripLeftRight ()
|
|||
{
|
||||
FStringData *old = Data();
|
||||
AllocBuffer(j - i + 1);
|
||||
StrCopy(Chars, old->Chars(), j - i + 1);
|
||||
StrCopy(Chars, old->Chars() + i, j - i + 1);
|
||||
old->Release();
|
||||
}
|
||||
}
|
||||
|
@ -899,8 +899,8 @@ void FString::StripLeftRight (const char *charset)
|
|||
else
|
||||
{
|
||||
FStringData *old = Data();
|
||||
AllocBuffer (j - i);
|
||||
StrCopy (Chars, old->Chars(), j - i);
|
||||
AllocBuffer (j - i + 1);
|
||||
StrCopy (Chars, old->Chars() + i, j - i + 1);
|
||||
old->Release();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue