# HG changeset patch # User Sam Lantinga # Date 1255168937 0 # Node ID 71bb88152e3f055701a665cdc4e5ed2640ef08a0 # Parent ca6f355e44b25d4cecc3ef2b553f9b40ca3ed1e0 Debian patch: 218_joystick_memmove.diff diff -r ca6f355e44b2 -r 71bb88152e3f src/joystick/SDL_joystick.c --- a/src/joystick/SDL_joystick.c Sat Oct 10 09:58:24 2009 +0000 +++ b/src/joystick/SDL_joystick.c Sat Oct 10 10:02:17 2009 +0000 @@ -391,8 +391,8 @@ /* Remove joystick from list */ for (i = 0; SDL_joysticks[i]; ++i) { if (joystick == SDL_joysticks[i]) { - SDL_memcpy(&SDL_joysticks[i], &SDL_joysticks[i + 1], - (SDL_numjoysticks - i) * sizeof(joystick)); + SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i + 1], + (SDL_numjoysticks - i) * sizeof(joystick)); break; } }