From: Pasi Kallinen Date: Fri, 5 Aug 2022 15:19:02 +0000 (+0300) Subject: Increase buffer size for saving menucolors X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b01d81277e51edc4218214ee82ce5c2f1536f919;p=nethack Increase buffer size for saving menucolors The '"regex"=color&attr' is max BUFSZ, so prefixing with MENUCOLOR= and adding a newline overflowed the temp buffer when saving the menucolors. --- diff --git a/src/options.c b/src/options.c index 05a2ec024..36eb69f5f 100644 --- a/src/options.c +++ b/src/options.c @@ -8788,7 +8788,7 @@ all_options_menucolors(strbuf_t *sbuf) { int i = 0, ncolors = count_menucolors(); struct menucoloring *tmp = g.menu_colorings; - char buf[BUFSZ]; + char buf[BUFSZ*2]; /* see also: add_menu_coloring() */ struct menucoloring **arr; if (!ncolors)