/*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2010 Parallel Realities
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
PersistData::PersistData()
{
- strcpy(data, "");
+ data[0] = 0;
}
PersistData::~PersistData()
{
if (strlen(data) > 149)
{
- debug(("ERROR: PERSISTANT DATA LINE EXCEEDS 150 CHARACTERS! IS %d!\n", strlen(data)));
+ debug(("ERROR: PERSISTANT DATA LINE EXCEEDS 150 CHARACTERS! IS %zd!\n", strlen(data)));
return false;
}
- strcpy(this->data, data);
+ strlcpy(this->data, data, sizeof this->data);
return true;
}