mirror of
https://github.com/libsdl-org/SDL
synced 2024-11-20 16:06:10 -07:00
testcontroller: fixed incorrect usage of memcpy()
This commit is contained in:
parent
344546b4ea
commit
850158f83f
1 changed files with 2 additions and 2 deletions
|
@ -2263,8 +2263,8 @@ static void RemoveMappingValueAt(MappingParts *parts, int index)
|
|||
SDL_free(parts->values[index]);
|
||||
--parts->num_elements;
|
||||
if (index < parts->num_elements) {
|
||||
SDL_memcpy(&parts->keys[index], &parts->keys[index] + 1, (parts->num_elements - index) * sizeof(parts->keys[index]));
|
||||
SDL_memcpy(&parts->values[index], &parts->values[index] + 1, (parts->num_elements - index) * sizeof(parts->values[index]));
|
||||
SDL_memmove(&parts->keys[index], &parts->keys[index] + 1, (parts->num_elements - index) * sizeof(parts->keys[index]));
|
||||
SDL_memmove(&parts->values[index], &parts->values[index] + 1, (parts->num_elements - index) * sizeof(parts->values[index]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue