/*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Entity::Entity()
{
- strcpy(name, "");
+ name[0] = 0;
x = y = dx = dy = tx = ty = width = height = 0;
id = 0;
health = 0;
void Entity::setName(const char *name)
{
- strcpy(this->name, name);
+ strlcpy(this->name, name, sizeof this->name);
}
void Entity::setSprites(Sprite *sprite1, Sprite *sprite2, Sprite *sprite3)