From 57dc097fb04117730e32a4bc8e35ac1dbfda1fd3 Mon Sep 17 00:00:00 2001 From: dhewg <dhewg@wiibrew.org> 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. --- neo/d3xp/gamesys/Event.cpp | 2 +- neo/game/gamesys/Event.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/neo/d3xp/gamesys/Event.cpp b/neo/d3xp/gamesys/Event.cpp index 09b11473..8b5c6f58 100644 --- a/neo/d3xp/gamesys/Event.cpp +++ b/neo/d3xp/gamesys/Event.cpp @@ -786,7 +786,7 @@ void idEvent::Save( idSaveGame *savefile ) { break; case D_EVENT_STRING : s.Clear(); - s.Append(reinterpret_cast<char *>(dataPtr), MAX_STRING_LEN); + s.Append(reinterpret_cast<char *>(dataPtr)); savefile->WriteString(s); size += MAX_STRING_LEN; break; diff --git a/neo/game/gamesys/Event.cpp b/neo/game/gamesys/Event.cpp index e2a62a52..3c440397 100644 --- a/neo/game/gamesys/Event.cpp +++ b/neo/game/gamesys/Event.cpp @@ -652,7 +652,7 @@ void idEvent::Save( idSaveGame *savefile ) { break; case D_EVENT_STRING : s.Clear(); - s.Append(reinterpret_cast<char *>(dataPtr), MAX_STRING_LEN); + s.Append(reinterpret_cast<char *>(dataPtr)); savefile->WriteString(s); size += MAX_STRING_LEN; break;