=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/rcs.c,v retrieving revision 1.65 retrieving revision 1.66 diff -c -r1.65 -r1.66 *** src/usr.bin/cvs/rcs.c 2005/09/19 15:47:14 1.65 --- src/usr.bin/cvs/rcs.c 2005/09/29 15:29:20 1.66 *************** *** 1,4 **** ! /* $OpenBSD: rcs.c,v 1.65 2005/09/19 15:47:14 niallo Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: rcs.c,v 1.66 2005/09/29 15:29:20 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 1214,1225 **** * cvs_buf_free() once the caller is done using it. */ BUF* ! rcs_getrev(RCSFILE *rfp, RCSNUM *rev) { int expmode, res; size_t len; void *bp; ! RCSNUM *crev; BUF *rbuf, *dbuf = NULL; struct rcs_delta *rdp = NULL; struct rcs_foo *lines; --- 1214,1225 ---- * cvs_buf_free() once the caller is done using it. */ BUF* ! rcs_getrev(RCSFILE *rfp, RCSNUM *frev) { int expmode, res; size_t len; void *bp; ! RCSNUM *crev, *rev; BUF *rbuf, *dbuf = NULL; struct rcs_delta *rdp = NULL; struct rcs_foo *lines; *************** *** 1228,1233 **** --- 1228,1238 ---- if (rfp->rf_head == NULL) return (NULL); + + if (frev == RCS_HEAD_REV) + rev = rfp->rf_head; + else + rev = frev; res = rcsnum_cmp(rfp->rf_head, rev, 0); if (res == 1) {