SDL_free() is not for pointers to SDL_RWops structures...

git-svn-id: https://svn.eduke32.com/eduke32@8151 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-10-19 23:42:24 +00:00 committed by Christoph Oelckers
parent c86af959b9
commit 0270cc2df5

View file

@ -855,13 +855,13 @@ static void LoadSDLControllerDB()
return; return;
} }
int i = SDL_GameControllerAddMappingsFromRW(rwops, 0); int i = SDL_GameControllerAddMappingsFromRW(rwops, 1);
if (i == -1) if (i == -1)
buildprintf("Failed loading game controller database: %s\n", SDL_GetError()); buildprintf("Failed loading game controller database: %s\n", SDL_GetError());
else else
buildputs("Loaded game controller database\n"); buildputs("Loaded game controller database\n");
SDL_free(rwops);
free(dbuf); free(dbuf);
} }
#endif #endif