Debian patch: 218_joystick_memmove.diff
authorSam Lantinga <slouken@libsdl.org>
Sat, 10 Oct 2009 10:02:17 +0000
changeset 336971bb88152e3f
parent 3368 ca6f355e44b2
child 3370 3e0f51e60fa2
Debian patch: 218_joystick_memmove.diff
src/joystick/SDL_joystick.c
     1.1 --- a/src/joystick/SDL_joystick.c	Sat Oct 10 09:58:24 2009 +0000
     1.2 +++ b/src/joystick/SDL_joystick.c	Sat Oct 10 10:02:17 2009 +0000
     1.3 @@ -391,8 +391,8 @@
     1.4      /* Remove joystick from list */
     1.5      for (i = 0; SDL_joysticks[i]; ++i) {
     1.6          if (joystick == SDL_joysticks[i]) {
     1.7 -            SDL_memcpy(&SDL_joysticks[i], &SDL_joysticks[i + 1],
     1.8 -                       (SDL_numjoysticks - i) * sizeof(joystick));
     1.9 +            SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i + 1],
    1.10 +                        (SDL_numjoysticks - i) * sizeof(joystick));
    1.11              break;
    1.12          }
    1.13      }