/*
-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
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;