This fixes 'split -l NNN foo'. As it stands split will
complain about an 'illegal line count' becuase it's looking at the wrong end pointer (ep) to detect any extra characters after the NNN. Submitted by: Rich Murphey <rich@freebsd.org> This should probably get pulled into 2.0.6 and 2.1.0
This commit is contained in:
parent
ef59de8517
commit
a3f8d23a48
@ -110,7 +110,7 @@ main(argc, argv)
|
||||
case 'l': /* Line count. */
|
||||
if (numlines != 0)
|
||||
usage();
|
||||
if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *p)
|
||||
if ((numlines = strtol(optarg, &ep, 10)) <= 0 || *ep)
|
||||
errx(1, "%s: illegal line count.", optarg);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user