]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CSwitch.cpp
Don't link pak tool with SDL.
[quix0rs-blobwars.git] / src / CSwitch.cpp
index d5492f4cc2c00329b16fba96e68658be57099850..f7e02981a182508b14c3f64764da425f8536bbd7 100644 (file)
@@ -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
@@ -37,10 +37,10 @@ Switch::Switch()
 
 void Switch::set(const char *name, const char *linkName, const char *requiredObjectName, const char *activateMessage, int type, int x, int y, bool activated)
 {
-       strncpy(this->name, name, sizeof this->name);
-       strncpy(this->linkName, linkName, sizeof this->linkName);
-       strncpy(this->requiredObjectName, requiredObjectName, sizeof this->requiredObjectName);
-       strncpy(this->activateMessage, activateMessage, sizeof this->activateMessage);
+       strlcpy(this->name, name, sizeof this->name);
+       strlcpy(this->linkName, linkName, sizeof this->linkName);
+       strlcpy(this->requiredObjectName, requiredObjectName, sizeof this->requiredObjectName);
+       strlcpy(this->activateMessage, activateMessage, sizeof this->activateMessage);
        this->type = type;
        this->x = x;
        this->y = y;