]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CPersistant.cpp
Use snprintf() and strncpy().
[quix0rs-blobwars.git] / src / CPersistant.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 5161f1f..82f03d6
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 Persistant::Persistant()
 {
-       strcpy(stageName, "");
+       stageName[0] = 0;
        numberOfLines = 0;
 }
 
@@ -34,7 +34,7 @@ Persistant::~Persistant()
 
 void Persistant::setName(const char *name)
 {
-       strcpy(this->stageName, name);
+       strncpy(this->stageName, name, sizeof this->stageName);
 }
 
 void Persistant::clear()