summaryrefslogtreecommitdiff
path: root/src/client/GameSave.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/GameSave.cpp')
-rw-r--r--src/client/GameSave.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp
index ed541b2..7e3cdf8 100644
--- a/src/client/GameSave.cpp
+++ b/src/client/GameSave.cpp
@@ -308,8 +308,12 @@ void GameSave::readOPS(char * data, int dataLength)
{
if(strcmp(bson_iterator_key(&signiter), "text")==0 && bson_iterator_type(&signiter)==BSON_STRING)
{
- tempSign.text = bson_iterator_string(&signiter);
+ char tempString[256];
+ strncpy(tempString, bson_iterator_string(&signiter), 255);
+ tempString[255] = 0;
clean_text((char*)tempSign.text.c_str(), 158-14);
+
+ tempSign.text = tempString;
}
else if(strcmp(bson_iterator_key(&signiter), "justification")==0 && bson_iterator_type(&signiter)==BSON_INT)
{