]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CWidget.cpp
Use strlcat() and strlcpy(), #define wrappers when these functions are not available.
[quix0rs-blobwars.git] / src / CWidget.cpp
index fbf8c3850d6a9248643fe968fce799968387256e..eaca00857356d53cca5f5c7aac837abd9273a5a8 100644 (file)
@@ -43,10 +43,10 @@ void Widget::setProperties(const char *name, const char *groupName, const char *
                exit(1);
        }
 
-       strncpy(this->name, name, sizeof this->name);
-       strncpy(this->groupName, groupName, sizeof this->groupName);
-       strncpy(this->label, label, sizeof this->label);
-       strncpy(this->options, options, sizeof this->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;