Use correct idStr::Append() while saving event strings

Used the wrong Append() in fad99572, we want to stop at a
terminating null char.
This commit is contained in:
dhewg 2011-12-27 22:26:02 +01:00 committed by Daniel Gibson
parent 92023f44ca
commit 851bd5901d
2 changed files with 2 additions and 2 deletions

View file

@ -786,7 +786,7 @@ void idEvent::Save( idSaveGame *savefile ) {
break; break;
case D_EVENT_STRING : case D_EVENT_STRING :
s.Clear(); s.Clear();
s.Append(reinterpret_cast<char *>(dataPtr), MAX_STRING_LEN); s.Append(reinterpret_cast<char *>(dataPtr));
savefile->WriteString(s); savefile->WriteString(s);
size += MAX_STRING_LEN; size += MAX_STRING_LEN;
break; break;

View file

@ -652,7 +652,7 @@ void idEvent::Save( idSaveGame *savefile ) {
break; break;
case D_EVENT_STRING : case D_EVENT_STRING :
s.Clear(); s.Clear();
s.Append(reinterpret_cast<char *>(dataPtr), MAX_STRING_LEN); s.Append(reinterpret_cast<char *>(dataPtr));
savefile->WriteString(s); savefile->WriteString(s);
size += MAX_STRING_LEN; size += MAX_STRING_LEN;
break; break;