]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CData.cpp
Cleanup .desktop file
[quix0rs-blobwars.git] / src / CData.cpp
index 419a61947c3e55b9a4c1b5e9b378798ffc560fc2..29f1dff0e2dbbd5f0cf8645dfb14a880d00d0aea 100644 (file)
@@ -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,8 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 Data::Data()
 {
-       strcpy(key, "");
-       strcpy(value, "");
+       key[0] = 0;
+       value[0] = 0;
        current = 0;
        target = 1;
 }
@@ -36,8 +36,8 @@ void Data::set(const char *key, const char *value, int current, int target)
                return;
        }
 
-       strcpy(this->key, key);
-       strcpy(this->value, value);
+       strlcpy(this->key, key, sizeof this->key);
+       strlcpy(this->value, value, sizeof this->value);
        this->current = current;
        this->target = target;
 }