]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CObjective.cpp
Use strlcat() and strlcpy(), #define wrappers when these functions are not available.
[quix0rs-blobwars.git] / src / CObjective.cpp
index 9bf75f310b79d4e12a3f180f6b0c8e4b304e3f51..aa5c6fb78f72a4e477c33419bc4f6675b57efca0 100644 (file)
@@ -34,8 +34,8 @@ Objective::Objective()
 
 Objective::Objective(const char *description, const char *target, int targetValue, bool required)
 {
-       strncpy(this->description, description, sizeof this->description);
-       strncpy(this->target, target, sizeof this->target);
+       strlcpy(this->description, description, sizeof this->description);
+       strlcpy(this->target, target, sizeof this->target);
        this->targetValue = targetValue;
        this->required = required;