commit 395c8e9e256b5d1308d6fbe98676523fb5934ee4
parent a8a60b29e679c33c8abbeb36875662a3dd26e4cb
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 30 Apr 2017 12:49:30 +0200
help: allocate enough space for the descriptions, so we don't crash
We should measure the length of each /translated/ shortcut description,
not of the original English one.
This fixes https://savannah.gnu.org/bugs/?50899.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/help.c b/src/help.c
@@ -470,7 +470,7 @@ void help_init(void)
* plus one or two \n's. */
for (f = allfuncs; f != NULL; f = f->next)
if (f->menus & currmenu)
- allocsize += (16 * MAXCHARLEN) + strlen(f->help) + 2;
+ allocsize += (16 * MAXCHARLEN) + strlen(_(f->help)) + 2;
#ifndef NANO_TINY
/* If we're on the main list, we also count the toggle help text.