From: nicm Date: Tue, 13 Jul 2010 20:41:55 +0000 (+0000) Subject: PR 6423 fix for cvs too, requested by xsa@. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1d911502078a1e7558f4eeb2b2c339889d0e8ac3;p=openbsd PR 6423 fix for cvs too, requested by xsa@. --- diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c index b524ad82188..1067620f10b 100644 --- a/usr.bin/cvs/rcs.c +++ b/usr.bin/cvs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.293 2010/07/09 20:07:05 naddy Exp $ */ +/* $OpenBSD: rcs.c,v 1.294 2010/07/13 20:41:55 nicm Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -492,7 +492,7 @@ rcs_write(RCSFILE *rfp) if (rdp->rd_log != NULL) { len = strlen(rdp->rd_log); rcs_strprint((const u_char *)rdp->rd_log, len, fp); - if (rdp->rd_log[len-1] != '\n') + if (len == 0 || rdp->rd_log[len-1] != '\n') fputc('\n', fp); } fputs("@\ntext\n@", fp);