]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CPersistData.cpp
Prevent a segmentation fault when using the -map option without specifying a map.
[quix0rs-blobwars.git] / src / CPersistData.cpp
index cd4bf141fe7ecba819cd4e9693c43dbafa4db63b..3a913ba82df63bbe22cfe13e1924f356438656fe 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -37,7 +38,7 @@ bool PersistData::setData(const char *data)
                return false;
        }
        
-       strncpy(this->data, data, sizeof this->data);
+       strlcpy(this->data, data, sizeof this->data);
        
        return true;
 }