Fix a core dump caused by negative numbers.
PR: 5858 Submitted by: Max Euston <meuston@jmrodgers.com>
This commit is contained in:
parent
00a2ade9b9
commit
5abf36273f
@ -165,6 +165,7 @@ badnum: errx(1, "illegal number: %s", line);
|
|||||||
if (*line == '-') {
|
if (*line == '-') {
|
||||||
(void)printf("minus%s", lflag ? " " : "\n");
|
(void)printf("minus%s", lflag ? " " : "\n");
|
||||||
++line;
|
++line;
|
||||||
|
--len;
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = len > 0 ? unit(len, line) : 0;
|
rval = len > 0 ? unit(len, line) : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user