Mercurial > sdl-ios-xcode
comparison src/joystick/macos/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 | 19418e4422cb |
children | d910939febfa |
comparison
equal
deleted
inserted
replaced
1378:dc0e13e7e1ae | 1379:c0a74f199ecf |
---|---|
163 { | 163 { |
164 SDL_OutOfMemory(); | 164 SDL_OutOfMemory(); |
165 return(-1); | 165 return(-1); |
166 } | 166 } |
167 SDL_memset(joystick->hwdata, 0, sizeof(*joystick->hwdata)); | 167 SDL_memset(joystick->hwdata, 0, sizeof(*joystick->hwdata)); |
168 SDL_strcpy(joystick->hwdata->name, SDL_SYS_JoystickName(index)); | 168 SDL_strlcpy(joystick->hwdata->name, SDL_SYS_JoystickName(index), SDL_arraysize(joystick->hwdata->name)); |
169 joystick->name = joystick->hwdata->name; | 169 joystick->name = joystick->hwdata->name; |
170 | 170 |
171 ISpElementList_ExtractByKind( | 171 ISpElementList_ExtractByKind( |
172 SYS_Elements[index], | 172 SYS_Elements[index], |
173 kISpElementKind_Axis, | 173 kISpElementKind_Axis, |