Skip to content

Commit

Permalink
fix discord details
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkzy committed Dec 17, 2023
1 parent b4d3130 commit dde3449
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/component/discord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ namespace discord
const auto gametype_display_name = game::UI_GetGameTypeDisplayName(gametype_dvar->current.string);
utils::string::strip(gametype_display_name, gametype, sizeof(gametype));

discord_presence.details = utils::string::va("%s on %s", gametype, mapname);
static char details[0x80] = {0};
strcpy_s(details, 0x80, utils::string::va("%s on %s", gametype, mapname));
discord_presence.details = details;

// setup Discord party (1 of 18)
const auto client_state = *game::mp::client_state;
Expand Down Expand Up @@ -211,8 +213,6 @@ namespace discord

void join_game(const char* join_secret)
{
console::debug("Discord: join_game called with secret '%s'\n", join_secret);

scheduler::once([=]
{
game::netadr_s target{};
Expand Down

0 comments on commit dde3449

Please sign in to comment.