diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2014-08-17 19:36:56 +0000 |
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2014-08-17 19:36:56 +0000 |
| commit | ef9e61785a7ca949fb97e63fa3463f27e60fe155 (patch) | |
| tree | 6f2a4886d0a823cea9fe9e5c8623482ca0ec5b81 /bin/sh | |
| parent | 06224a949279538623233641854998dd0282f35b (diff) | |
Notes
Diffstat (limited to 'bin/sh')
| -rw-r--r-- | bin/sh/histedit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index a8c376a295fe..c65d1c7134e5 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -166,9 +166,10 @@ sethistsize(const char *hs) HistEvent he; if (hist != NULL) { - if (hs == NULL || *hs == '\0' || - (histsize = atoi(hs)) < 0) + if (hs == NULL || !is_number(hs)) histsize = 100; + else + histsize = atoi(hs); history(hist, &he, H_SETSIZE, histsize); history(hist, &he, H_SETUNIQUE, 1); } |
