Fix a core dump caused by negative numbers.

PR:		5858
Submitted by:	Max Euston <meuston@jmrodgers.com>
This commit is contained in:
Steve Price 1998-02-26 21:13:17 +00:00
parent 88aa4bcb73
commit f31bc1dedc

View File

@ -165,6 +165,7 @@ badnum: errx(1, "illegal number: %s", line);
if (*line == '-') {
(void)printf("minus%s", lflag ? " " : "\n");
++line;
--len;
}
rval = len > 0 ? unit(len, line) : 0;