Replace calls to asprintf with SDL_asprintf

This commit is contained in:
Cameron Cawley
2021-09-14 20:38:03 +01:00
committed by Sam Lantinga
parent 25a614bc3e
commit 08ae790497
2 changed files with 3 additions and 3 deletions

View File

@@ -426,7 +426,7 @@ BSD_JoystickOpen(SDL_Joystick *joy, int device_index)
str[i] = UGETW(usd.usd_desc.bString[i]);
}
str[i] = '\0';
asprintf(&new_name, "%s @ %s", str, path);
SDL_asprintf(&new_name, "%s @ %s", str, path);
if (new_name != NULL) {
SDL_free(joydevnames[numjoysticks]);
joydevnames[numjoysticks] = new_name;