mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
Nun q_shared-c zurückrollen
This commit is contained in:
parent
4bb8c98948
commit
9ff8b0c6e4
1 changed files with 3 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue