/*
-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
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;
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;