summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/co.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/rcs/co.c')
-rw-r--r--usr.bin/rcs/co.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index f16aae93e25..7664ac914b1 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.74 2006/04/12 08:27:31 deraadt Exp $ */
+/* $OpenBSD: co.c,v 1.75 2006/04/13 00:58:25 ray Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -176,9 +176,10 @@ checkout_main(int argc, char **argv)
rcs_kwexp_set(file, kflag);
- if (rev_str != NULL)
- rcs_set_rev(rev_str, &rev);
- else {
+ if (rev_str != NULL) {
+ if ((rev = rcs_getrevnum(rev_str, file)) == NULL)
+ fatal("invalid revision: %s", rev_str);
+ } else {
rev = rcsnum_alloc();
rcsnum_cpy(file->rf_head, rev, 0);
}