Fix warning the value of the size argument in strncat is too large

This commit is contained in:
Pan7 2017-07-10 18:36:42 +02:00
parent 52da823a3c
commit 345c53ae53

View file

@ -581,7 +581,7 @@ void FillTextureList( GSList** pArray )
colon = strstr( (char*)l_shaderfiles->data, ":" ); colon = strstr( (char*)l_shaderfiles->data, ":" );
if( colon ) if( colon )
{ {
strncat( shaderfile, colon, sizeof( shaderfile ) ); strncat( shaderfile, colon, sizeof( shaderfile ) - strlen( shaderfile ) - 1 );
} }
for ( GSList *tmp = texdirs; tmp; tmp = g_slist_next( tmp ) ) for ( GSList *tmp = texdirs; tmp; tmp = g_slist_next( tmp ) )