]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CData.cpp
Use strlcat() and strlcpy(), #define wrappers when these functions are not available.
[quix0rs-blobwars.git] / src / CData.cpp
index 12642eddc75fab3be6a6d99249c56c7b2b701156..e0823944af448c356004fc2a8c9996807e662261 100644 (file)
@@ -36,8 +36,8 @@ void Data::set(const char *key, const char *value, int current, int target)
                return;
        }
 
-       strncpy(this->key, key, sizeof this->key);
-       strncpy(this->value, value, sizeof this->value);
+       strlcpy(this->key, key, sizeof this->key);
+       strlcpy(this->value, value, sizeof this->value);
        this->current = current;
        this->target = target;
 }