Nun q_shared-c zurückrollen

This commit is contained in:
Yamagi Burmeister 2009-03-03 00:17:07 +00:00
parent 4bb8c98948
commit 9ff8b0c6e4

View file

@ -1233,7 +1233,7 @@ int Q_strcasecmp (char *s1, char *s2)
int Com_sprintf (char *dest, int size, char *fmt, ...)
void Com_sprintf (char *dest, int size, char *fmt, ...)
{
int len;
va_list argptr;
@ -1242,16 +1242,9 @@ int Com_sprintf (char *dest, int size, char *fmt, ...)
va_start (argptr,fmt);
len = vsnprintf (bigbuffer,0x10000,fmt,argptr);
va_end (argptr);
if (len == -1 || len == size)
{
if (len >= size)
Com_Printf ("Com_sprintf: overflow of %i in %i\n", len, size);
len = size - -1;
}
bigbuffer[size-1] = '\0';
strcpy (dest, bigbuffer);
return len;
strncpy (dest, bigbuffer, size-1);
}
/*