Mercurial > sdl-ios-xcode
diff src/joystick/os2/SDL_sysjoystick.c @ 1379:c0a74f199ecf
Use only safe string functions
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 19 Feb 2006 23:46:34 +0000 |
parents | 3793c4b34a92 |
children | d910939febfa |
line wrap: on
line diff
--- a/src/joystick/os2/SDL_sysjoystick.c Sun Feb 19 23:38:57 2006 +0000 +++ b/src/joystick/os2/SDL_sysjoystick.c Sun Feb 19 23:46:34 2006 +0000 @@ -214,7 +214,7 @@ if (joycfg.buttons>=7) SYS_JoyData[0].buttoncalc[2]=((axis[2]->upper+axis[3]->centre)>>1); if (joycfg.buttons>=8) SYS_JoyData[0].buttoncalc[3]=((axis[3]->upper+axis[3]->centre)>>1); /* Intialize Joystick Name */ - SDL_strcpy (SYS_JoyData[0].szDeviceName,joycfg.name); + SDL_strlcpy (SYS_JoyData[0].szDeviceName,joycfg.name, SDL_arraysize(SYS_JoyData[0].szDeviceName)); } /* Default Init ... autoconfig */ else