bug report tahoe/usr.bin/1; number of lines arg handled incorrectly
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 19 May 1987 02:51:17 +0000 (18:51 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 19 May 1987 02:51:17 +0000 (18:51 -0800)
SCCS-vsn: usr.bin/split/split.c 4.4

usr/src/usr.bin/split/split.c

index 203b9cc..56884cb 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)split.c     4.3 (Berkeley) %G%";
+static char *sccsid = "@(#)split.c     4.4 (Berkeley) %G%";
 
 #include <sys/param.h>
 #include <sys/file.h>
 
 #include <sys/param.h>
 #include <sys/file.h>
@@ -51,7 +51,7 @@ char  **argv;
                                default:
                                        if (!isdigit(argv[cnt][1]) || bytecnt)
                                                usage();
                                default:
                                        if (!isdigit(argv[cnt][1]) || bytecnt)
                                                usage();
-                                       if ((numlines = atol(argv[cnt] + 2)) <= 0) {
+                                       if ((numlines = atol(argv[cnt] + 1)) <= 0) {
                                                fputs("split: line count must be greater than zero.\n",stderr);
                                                usage();
                                        }
                                                fputs("split: line count must be greater than zero.\n",stderr);
                                                usage();
                                        }