comparison src/joystick/SDL_joystick.c @ 4310:c878006a5948 SDL-1.2

Debian patch: 218_joystick_memmove.diff
author Sam Lantinga <slouken@libsdl.org>
date Sat, 10 Oct 2009 10:01:38 +0000
parents a1b03ba2fcd0
children 3c35b8d3b9fc
comparison
equal deleted inserted replaced
4309:3aab8b57cbd1 4310:c878006a5948
374 SDL_SYS_JoystickClose(joystick); 374 SDL_SYS_JoystickClose(joystick);
375 375
376 /* Remove joystick from list */ 376 /* Remove joystick from list */
377 for ( i=0; SDL_joysticks[i]; ++i ) { 377 for ( i=0; SDL_joysticks[i]; ++i ) {
378 if ( joystick == SDL_joysticks[i] ) { 378 if ( joystick == SDL_joysticks[i] ) {
379 SDL_memcpy(&SDL_joysticks[i], &SDL_joysticks[i+1], 379 SDL_memmove(&SDL_joysticks[i], &SDL_joysticks[i+1],
380 (SDL_numjoysticks-i)*sizeof(joystick)); 380 (SDL_numjoysticks-i)*sizeof(joystick));
381 break; 381 break;
382 } 382 }
383 } 383 }
384 384