]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CPersistData.cpp
Do not use DESTDIR in PREFIX, but only in the install target.
[quix0rs-blobwars.git] / src / CPersistData.cpp
old mode 100755 (executable)
new mode 100644 (file)
index b0d2430..255ce62
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2010 Parallel Realities
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 PersistData::PersistData()
 {
-       strcpy(data, "");
+       data[0] = 0;
 }
 
 PersistData::~PersistData()
@@ -33,11 +33,11 @@ bool PersistData::setData(const char *data)
 {
        if (strlen(data) > 149)
        {
-               debug(("ERROR: PERSISTANT DATA LINE EXCEEDS 150 CHARACTERS! IS %d!\n", strlen(data)));
+               debug(("ERROR: PERSISTANT DATA LINE EXCEEDS 150 CHARACTERS! IS %zd!\n", strlen(data)));
                return false;
        }
        
-       strcpy(this->data, data);
+       strlcpy(this->data, data, sizeof this->data);
        
        return true;
 }