changeset 3369:71bb88152e3f

Debian patch: 218_joystick_memmove.diff
author Sam Lantinga <slouken@libsdl.org>
date Sat, 10 Oct 2009 10:02:17 +0000
parents ca6f355e44b2
children 3e0f51e60fa2
files src/joystick/SDL_joystick.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
         }
     }