Was not using the specified output filename with -c

This commit is contained in:
Pierre Pronchery 2008-06-12 05:40:18 +00:00
parent 1a1d24c6e4
commit 5930c622d1

View File

@ -111,7 +111,7 @@ static char * _new_outfile(int flags, char const * outfile,
char * ret;
size_t len;
if(flags & C99PREFS_c && pathname != NULL)
if(flags & C99PREFS_c && outfile == NULL && pathname != NULL)
{
if((len = strlen(pathname)) < 3 || pathname[len - 2] != '.'
|| pathname[len - 1] != 'c')