# HG changeset patch # User Sam Lantinga # Date 1255168898 0 # Node ID c878006a5948e2a03e023f30f091f61d74da3f05 # Parent 3aab8b57cbd147a50075a3e375bdbd263fbf3eb8 Debian patch: 218_joystick_memmove.diff diff -r 3aab8b57cbd1 -r c878006a5948 src/joystick/SDL_joystick.c --- a/src/joystick/SDL_joystick.c Sat Oct 10 09:59:29 2009 +0000 +++ b/src/joystick/SDL_joystick.c Sat Oct 10 10:01:38 2009 +0000 @@ -376,7 +376,7 @@ /* 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_memmove(&SDL_joysticks[i], &SDL_joysticks[i+1], (SDL_numjoysticks-i)*sizeof(joystick)); break; }