mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Fixed junk character(s) left after removing portion of string
See http://forum.zdoom.org/viewtopic.php?t=54379
This commit is contained in:
parent
2e99681ced
commit
0488b18f8f
1 changed files with 1 additions and 0 deletions
|
@ -397,6 +397,7 @@ void FString::Remove(size_t index, size_t remlen)
|
|||
if (Data()->RefCount == 1)
|
||||
{ // Can do this in place
|
||||
memmove(Chars + index, Chars + index + remlen, Len() - index - remlen);
|
||||
memset(Chars + Len() - remlen, 0, remlen);
|
||||
Data()->Len -= (unsigned)remlen;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue