From 851bd5901dc7405d3f494887b27b99de44583647 Mon Sep 17 00:00:00 2001 From: dhewg Date: Tue, 27 Dec 2011 22:26:02 +0100 Subject: [PATCH] Use correct idStr::Append() while saving event strings Used the wrong Append() in fad99572, we want to stop at a terminating null char. --- d3xp/gamesys/Event.cpp | 2 +- game/gamesys/Event.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/d3xp/gamesys/Event.cpp b/d3xp/gamesys/Event.cpp index 09b1147..8b5c6f5 100644 --- a/d3xp/gamesys/Event.cpp +++ b/d3xp/gamesys/Event.cpp @@ -786,7 +786,7 @@ void idEvent::Save( idSaveGame *savefile ) { break; case D_EVENT_STRING : s.Clear(); - s.Append(reinterpret_cast(dataPtr), MAX_STRING_LEN); + s.Append(reinterpret_cast(dataPtr)); savefile->WriteString(s); size += MAX_STRING_LEN; break; diff --git a/game/gamesys/Event.cpp b/game/gamesys/Event.cpp index e2a62a5..3c44039 100644 --- a/game/gamesys/Event.cpp +++ b/game/gamesys/Event.cpp @@ -652,7 +652,7 @@ void idEvent::Save( idSaveGame *savefile ) { break; case D_EVENT_STRING : s.Clear(); - s.Append(reinterpret_cast(dataPtr), MAX_STRING_LEN); + s.Append(reinterpret_cast(dataPtr)); savefile->WriteString(s); size += MAX_STRING_LEN; break;