Fixed junk character(s) left after removing portion of string

See http://forum.zdoom.org/viewtopic.php?t=54379
This commit is contained in:
alexey.lysiuk 2016-11-26 13:26:44 +02:00 committed by Christoph Oelckers
parent 2e99681ced
commit 0488b18f8f

View file

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