From f89968a97388df17336edeb229c1daa1af95833c Mon Sep 17 00:00:00 2001 From: PatR Date: Sat, 12 May 2018 01:05:29 -0700 Subject: [PATCH] fix #H7140 - list MSGTYPE values shows empty strings The 'O' menu's 'list' for MSGTYPE settings showed truncated versions of really long message strings but didn't show anything except the hide/stop/norep setting for ordinary length ones. 3.6.0 showed the latter correctly but suffered buffer overflow for the former; the fix for that had a typo/thinko in it. --- src/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options.c b/src/options.c index b0c125051..6a265e006 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1510963525 2017/11/18 00:05:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.319 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1526112322 2018/05/12 08:05:22 $ $NHDT-Branch: master $:$NHDT-Revision: 1.323 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -4821,7 +4821,7 @@ boolean setinitial, setfromfile; if (strlen(tmp->pattern) > ln) Strcat(strncat(mtbuf, tmp->pattern, ln - 3), "...\""); else - Strcat(mtbuf, "\""); + Strcat(strcat(mtbuf, tmp->pattern), "\""); add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, mtbuf, MENU_UNSELECTED); tmp = tmp->next; -- 2.40.0