diff --git a/src/Makefile b/src/Makefile index da96f0cf..6ea7fd78 100644 --- a/src/Makefile +++ b/src/Makefile @@ -515,6 +515,10 @@ ifdef ZDEBUG CPPFLAGS+=-DZDEBUG endif +ifdef DUMPCONSISTENCY + CPPFLAGS+=-DDUMPCONSISTENCY +endif + ifdef DEVELOP CPPFLAGS+=-DDEVELOP endif diff --git a/src/discord.c b/src/discord.c index db0ea344..ba68da72 100644 --- a/src/discord.c +++ b/src/discord.c @@ -361,8 +361,7 @@ static const char *DRPC_GetServerIP(void) { // We're not the server, so we could successfully get the IP! // No need to do anything else :) - sprintf(self_ip, "%s:%u", address, current_port); - return self_ip; + return address; } } @@ -461,10 +460,7 @@ void DRPC_UpdatePresence(void) // Grab the host's IP for joining. if ((join = DRPC_GetServerIP()) != NULL) { - char *xorjoin = DRPC_XORIPString(join); - discordPresence.joinSecret = xorjoin; - free(xorjoin); - + discordPresence.joinSecret = DRPC_XORIPString(join); joinSecretSet = true; } }