diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-08-08 07:03:50 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-08-08 07:03:50 +0000 |
commit | c72aa990fb62f093944cc3d8590a1dcd8fe7fbc5 (patch) | |
tree | b947352186abb174f77ed9b3c1133c6c0300a095 /lib/libedit | |
parent | 31c555966c787974abf5860e5789a2cfeaf16250 (diff) | |
download | FreeBSD-src-c72aa990fb62f093944cc3d8590a1dcd8fe7fbc5.zip FreeBSD-src-c72aa990fb62f093944cc3d8590a1dcd8fe7fbc5.tar.gz |
Don't forget to copy the sentinel into the `help' array. It's expected to
be there.
Submitted by: Björn König
PR: 82381
Diffstat (limited to 'lib/libedit')
-rw-r--r-- | lib/libedit/map.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libedit/map.c b/lib/libedit/map.c index 4f225e8..6714248 100644 --- a/lib/libedit/map.c +++ b/lib/libedit/map.c @@ -913,11 +913,11 @@ map_init(EditLine *el) el->el_map.vic = el_map_vi_command; el->el_map.vii = el_map_vi_insert; el->el_map.help = (el_bindings_t *) el_malloc(sizeof(el_bindings_t) * - EL_NUM_FCNS); + (EL_NUM_FCNS + 1)); if (el->el_map.help == NULL) return (-1); (void) memcpy(el->el_map.help, help__get(), - sizeof(el_bindings_t) * EL_NUM_FCNS); + sizeof(el_bindings_t) * (EL_NUM_FCNS + 1)); el->el_map.func = (el_func_t *)el_malloc(sizeof(el_func_t) * EL_NUM_FCNS); if (el->el_map.func == NULL) |