summaryrefslogtreecommitdiffstats
path: root/bin/sh/histedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/histedit.c')
-rw-r--r--bin/sh/histedit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c
index a8c376a..c65d1c7 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);
}
OpenPOWER on IntegriCloud