diff options
Diffstat (limited to 'g10/openfile.c')
-rw-r--r-- | g10/openfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/openfile.c b/g10/openfile.c index 97a2e7f54..8c78670d7 100644 --- a/g10/openfile.c +++ b/g10/openfile.c @@ -190,10 +190,10 @@ open_outfile( const char *iname, int mode, IOBUF *a ) dot = strchr(buf, '.' ); if( dot && dot > buf && dot[1] && strlen(dot) <= 4 && CMP_FILENAME(newsfx, dot) ) { - strcpy(buf, newsfx ); + strcpy(dot, newsfx ); } else if( dot && !dot[1] ) /* don't duplicate a dot */ - strcpy( dot, newsfx ); + strcpy( dot, newsfx+1 ); else strcat( buf, newsfx ); #else |