/*
-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
const char *Keyboard::translateKey(int key)
{
static char keyName[50];
- strcpy(keyName, "");
+ keyName[0] = 0;
keyName[0] = '\0';
if (key <= 0)
return "...";
}
- strcpy(keyName, _(SDL_GetKeyName((SDLKey)key)));
+ strlcpy(keyName, _(SDL_GetKeyName((SDLKey)key)), sizeof keyName);
/*
This is not really neccessary, but it just makes