Commit 395c8e9e authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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.
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment