mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
* Merge 954:955 from 1.34 branch
This commit is contained in:
parent
4502f863d4
commit
4abd270a67
4 changed files with 9 additions and 9 deletions
|
@ -469,9 +469,9 @@ int PC_StringizeTokens(token_t *tokens, token_t *token)
|
|||
strcat(token->string, "\"");
|
||||
for (t = tokens; t; t = t->next)
|
||||
{
|
||||
strncat(token->string, t->string, MAX_TOKEN - strlen(token->string));
|
||||
strncat(token->string, t->string, MAX_TOKEN - strlen(token->string) - 1);
|
||||
} //end for
|
||||
strncat(token->string, "\"", MAX_TOKEN - strlen(token->string));
|
||||
strncat(token->string, "\"", MAX_TOKEN - strlen(token->string) - 1);
|
||||
return qtrue;
|
||||
} //end of the function PC_StringizeTokens
|
||||
//============================================================================
|
||||
|
@ -1015,7 +1015,7 @@ int PC_Directive_include(source_t *source)
|
|||
break;
|
||||
} //end if
|
||||
if (token.type == TT_PUNCTUATION && *token.string == '>') break;
|
||||
strncat(path, token.string, MAX_PATH);
|
||||
strncat(path, token.string, MAX_PATH - 1);
|
||||
} //end while
|
||||
if (*token.string != '>')
|
||||
{
|
||||
|
|
|
@ -2869,7 +2869,7 @@ void CL_ServerInfoPacket( netadr_t from, msg_t *msg ) {
|
|||
Q_strncpyz( info, MSG_ReadString( msg ), MAX_INFO_STRING );
|
||||
if (strlen(info)) {
|
||||
if (info[strlen(info)-1] != '\n') {
|
||||
strncat(info, "\n", sizeof(info));
|
||||
strncat(info, "\n", sizeof(info) - 1);
|
||||
}
|
||||
Com_Printf( "%s: %s", NET_AdrToString( from ), info );
|
||||
}
|
||||
|
|
|
@ -176,8 +176,8 @@ qboolean QAL_Init(const char *libname)
|
|||
#else
|
||||
char fn[1024];
|
||||
getcwd(fn, sizeof(fn));
|
||||
strncat(fn, "/", sizeof(fn));
|
||||
strncat(fn, libname, sizeof(fn));
|
||||
strncat(fn, "/", sizeof(fn) - strlen(fn) - 1);
|
||||
strncat(fn, libname, sizeof(fn) - strlen(fn) - 1);
|
||||
|
||||
if( (OpenALLib = OBJLOAD(fn)) == 0 )
|
||||
{
|
||||
|
|
|
@ -1236,7 +1236,7 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize )
|
|||
if( msg[ i ] == '\n' )
|
||||
{
|
||||
Com_sprintf( tempBuffer, 7, "%c[0m\n", 0x1B );
|
||||
strncat( buffer, tempBuffer, bufferSize );
|
||||
strncat( buffer, tempBuffer, bufferSize - 1);
|
||||
i++;
|
||||
}
|
||||
else if( msg[ i ] == Q_COLOR_ESCAPE )
|
||||
|
@ -1258,7 +1258,7 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize )
|
|||
if( escapeCode )
|
||||
{
|
||||
Com_sprintf( tempBuffer, 7, "%c[%sm", 0x1B, escapeCode );
|
||||
strncat( buffer, tempBuffer, bufferSize );
|
||||
strncat( buffer, tempBuffer, bufferSize - 1);
|
||||
}
|
||||
|
||||
i++;
|
||||
|
@ -1267,7 +1267,7 @@ void Sys_ANSIColorify( const char *msg, char *buffer, int bufferSize )
|
|||
else
|
||||
{
|
||||
Com_sprintf( tempBuffer, 7, "%c", msg[ i++ ] );
|
||||
strncat( buffer, tempBuffer, bufferSize );
|
||||
strncat( buffer, tempBuffer, bufferSize - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue