mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 23:18:29 +00:00
Fixed freeing strings created by strdup() with SDL_free().
This only worked on platforms where SDL_free() wraps free().
This commit is contained in:
@@ -74,8 +74,8 @@ extern "C"
|
||||
if (joystick.Open(name) != B_ERROR) {
|
||||
BString stick_name;
|
||||
joystick.GetControllerName(&stick_name);
|
||||
SDL_joyport[SDL_SYS_numjoysticks] = strdup(name);
|
||||
SDL_joyname[SDL_SYS_numjoysticks] = strdup(stick_name.String());
|
||||
SDL_joyport[SDL_SYS_numjoysticks] = SDL_strdup(name);
|
||||
SDL_joyname[SDL_SYS_numjoysticks] = SDL_strdup(stick_name.String());
|
||||
SDL_SYS_numjoysticks++;
|
||||
joystick.Close();
|
||||
}
|
||||
|
Reference in New Issue
Block a user