X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=common.c;h=667f99c6bbe887ca940a568f632663c81dcbf198;hb=refs%2Fheads%2FMario%2Fflag_slide_fix;hp=47edc4c9c06211253896925212c7358a01772670;hpb=bd6ea691f42e1788efd6bb38447f889d03b9f089;p=xonotic%2Fdarkplaces.git diff --git a/common.c b/common.c index 47edc4c9..667f99c6 100644 --- a/common.c +++ b/common.c @@ -1620,7 +1620,7 @@ void COM_Init_Commands (void) { // 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++] = '\"'; } @@ -2287,7 +2287,7 @@ size_t base64_encode(unsigned char *buf, size_t buflen, size_t outbuflen) 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; }