From f5885f84f039df2da679366c2f3ea9a2079b62dc Mon Sep 17 00:00:00 2001 From: toaster Date: Tue, 19 Nov 2019 13:40:07 +0000 Subject: [PATCH] lmao how did i forget a null terminator --- src/d_clisrv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index ece74ed4b..cde0382f5 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1304,7 +1304,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) if (strcmp(mapheaderinfo[gamemap-1]->lvlttl, "")) { char *read = mapheaderinfo[gamemap-1]->lvlttl, *writ = netbuffer->u.serverinfo.maptitle; - while (*read != '\0' && (read-mapheaderinfo[gamemap-1]->lvlttl) < 33) + while (*read != '\0' && (read-mapheaderinfo[gamemap-1]->lvlttl) < 32) { if (!(*read & 0x80)) { @@ -1313,6 +1313,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) } read++; } + *writ = '\0'; //strncpy(netbuffer->u.serverinfo.maptitle, (char *)mapheaderinfo[gamemap-1]->lvlttl, 33); } else