1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-08 18:09:45 +01:00

Replace strncpy with SDL_strncpy

Co-authored-by: Dav999 <dav999.tolp@gmail.com>
This commit is contained in:
Max Parry 2024-12-13 08:03:35 +11:00 committed by GitHub
parent 7975b27e7c
commit 76d57382ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,12 +144,9 @@ void DISCORD_update(const char *level, const char *name)
{
app.activityMan = app.core->get_activity_manager(app.core);
}
strncpy(activity.state, name, 127);
strncpy(activity.assets.large_image, "vvvvvv", 127);
strncpy(activity.assets.large_text, level, 127);
activity.state[127] = '\0';
activity.assets.large_image[127] = '\0';
activity.assets.large_text[127] = '\0';
SDL_strlcpy(activity.state, name, sizeof(activity.state));
SDL_strlcpy(activity.assets.large_image, "vvvvvv", sizeof(activity.assets.large_image));
SDL_strlcpy(activity.assets.large_text, level, sizeof(activity.assets.large_text));
app.activityMan->update_activity(app.activityMan, &activity, NULL, NULL);