mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-26 12:59:18 +01:00
Null termnate the pUserMappings variable to prevent memory corruption.
This commit is contained in:
parent
e56bbe3f71
commit
ab9345a896
@ -835,6 +835,7 @@ SDL_GameControllerLoadHints()
|
||||
char *pUserMappings = SDL_malloc( nchHints + 1 );
|
||||
char *pTempMappings = pUserMappings;
|
||||
SDL_memcpy( pUserMappings, hint, nchHints );
|
||||
pUserMappings[nchHints] = '\0';
|
||||
while ( pUserMappings ) {
|
||||
char *pchNewLine = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user