]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CTrain.cpp
Use strlcat() and strlcpy(), #define wrappers when these functions are not available.
[quix0rs-blobwars.git] / src / CTrain.cpp
index b385278d7407293a412a4bd36096f032ff32ab09..89d53029f91ad5d5032700078a594b4b7f56ace4 100644 (file)
@@ -76,7 +76,7 @@ bool Train::waitsForPlayer()
 
 void Train::setName(const char *name)
 {
-       strncpy(this->name, name, sizeof this->name);
+       strlcpy(this->name, name, sizeof this->name);
 }
 
 void Train::set(int startX, int startY, int endX, int endY, int pause, bool fromStart)