]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CWidget.cpp
Don't link pak tool with SDL.
[quix0rs-blobwars.git] / src / CWidget.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 85c7e40..9085e62
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 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,10 +22,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 Widget::Widget()
 {
-       strcpy(name, "");
-       strcpy(groupName, "");
-       strcpy(label, "");
-       strcpy(options, "");
+       name[0] = 0;
+       groupName[0] = 0;
+       label[0] = 0;
+       options[0] = 0;
        x = y = type = min = max = 0;
        enabled = visible = true;
        changed = false;
@@ -43,10 +43,10 @@ void Widget::setProperties(const char *name, const char *groupName, const char *
                exit(1);
        }
 
-       strcpy(this->name, name);
-       strcpy(this->groupName, groupName);
-       strcpy(this->label, label);
-       strcpy(this->options, options);
+       strlcpy(this->name, name, sizeof this->name);
+       strlcpy(this->groupName, groupName, sizeof this->groupName);
+       strlcpy(this->label, label, sizeof this->label);
+       strlcpy(this->options, options, sizeof this->options);
        this->x = x;
        this->y = y;
        this->min = min;