]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CLineDef.cpp
Use strlcat() and strlcpy(), #define wrappers when these functions are not available.
[quix0rs-blobwars.git] / src / CLineDef.cpp
index 916bdf68a3306c96b74e295b5aa84c1b733b47d9..06865737ccbd6f0217b9c6b586010708a4d8012e 100644 (file)
@@ -33,9 +33,9 @@ LineDef::LineDef()
 
 void LineDef::set(const char *name, const char *linkName, const char *activateMessage, int x, int y, int width, int height)
 {
-       strncpy(this->name, name, sizeof this->name);
-       strncpy(this->linkName, linkName, sizeof this->linkName);
-       strncpy(this->activateMessage, activateMessage, sizeof this->activateMessage);
+       strlcpy(this->name, name, sizeof this->name);
+       strlcpy(this->linkName, linkName, sizeof this->linkName);
+       strlcpy(this->activateMessage, activateMessage, sizeof this->activateMessage);
        this->x = x;
        this->y = y;
        this->width = width;