mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix off by one error in http downloader
This commit is contained in:
parent
30f5e928dd
commit
9d31786c8c
1 changed files with 1 additions and 1 deletions
|
|
@ -1475,7 +1475,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
|
|||
if (mirror_length > MAX_MIRROR_LENGTH)
|
||||
mirror_length = MAX_MIRROR_LENGTH;
|
||||
|
||||
if (snprintf(netbuffer->u.serverinfo.httpsource, mirror_length, "%s", httpurl) < 0)
|
||||
if (snprintf(netbuffer->u.serverinfo.httpsource, mirror_length+1, "%s", httpurl) < 0)
|
||||
// If there's an encoding error, send nothing, we accept that the above may be truncated
|
||||
strncpy(netbuffer->u.serverinfo.httpsource, "", mirror_length);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue