// if there are spaces in the game's network filter name it would
// cause parse errors in getservers in dpmaster, so we need to replace
// them with _ characters
- strlcpy(gamenetworkfilternamebuffer, gamenetworkfiltername, sizeof(gamenetworkfiltername));
+ strlcpy(gamenetworkfilternamebuffer, gamenetworkfiltername, sizeof(gamenetworkfilternamebuffer));
while ((s = strchr(gamenetworkfilternamebuffer, ' ')) != NULL)
*s = '_';
gamenetworkfiltername = gamenetworkfilternamebuffer;
{
// arg contains whitespace, store quotes around it
com_cmdline[n++] = '\"';
- while ((n < ((int)sizeof(com_cmdline) - 1)) && com_argv[j][i])
+ while ((n < ((int)sizeof(com_cmdline) - 2)) && com_argv[j][i])
com_cmdline[n++] = com_argv[j][i++];
com_cmdline[n++] = '\"';
}
for(i = blocks; i > 0; )
{
--i;
- base64_3to4(buf + 3*i, buf + 4*i, buflen - 3*i);
+ base64_3to4(buf + 3*i, buf + 4*i, (int)(buflen - 3*i));
}
return blocks * 4;
}