summaryrefslogtreecommitdiff
path: root/cmd-line-utils/libedit/history.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/libedit/history.c')
-rw-r--r--cmd-line-utils/libedit/history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-line-utils/libedit/history.c b/cmd-line-utils/libedit/history.c
index ad47a5572e4..0294734b9a3 100644
--- a/cmd-line-utils/libedit/history.c
+++ b/cmd-line-utils/libedit/history.c
@@ -731,7 +731,7 @@ history_save(History *h, const char *fname)
len = strlen(ev.str) * 4 + 1;
if (len >= max_size) {
char *nptr;
- max_size = (len + 1023) & 1023;
+ max_size = (len + 1023) & ~1023;
nptr = h_realloc(ptr, max_size);
if (nptr == NULL) {
i = -1;