From: nothere Date: Sat, 23 Aug 2003 14:14:50 +0000 (+0000) Subject: {%!!}という銘が刻まれた場合に最後の'!'の右側が文字列終端の'\0'であり, X-Git-Tag: v2.1.2~1205 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=699c46d9586cdde0305ae1844f297f7ada38d2bd;p=hengband%2Fhengband.git {%!!}という銘が刻まれた場合に最後の'!'の右側が文字列終端の'\0'であり, command_cmd == 0にヒットした結果, 確認が出てしまうバグを修正. {!!}の 銘はget_item_allow()内では無視することとした. 1.68でのcommand_cmd = 0 とする変更によるエンバグであった. --- diff --git a/src/object1.c b/src/object1.c index 2ab40a423..396f898f0 100644 --- a/src/object1.c +++ b/src/object1.c @@ -5376,8 +5376,11 @@ static bool get_item_allow(int item) /* Process preventions */ while (s) { + /* Ignore the "!!" inscription */ + if (s[1] == '!') s++; + /* Check the "restriction" */ - if ((s[1] == command_cmd) || (s[1] == '*')) + else if ((s[1] == command_cmd) || (s[1] == '*')) { /* Verify the choice */ #ifdef JP