From: mogami Date: Thu, 22 Jan 2004 10:34:39 +0000 (+0000) Subject: 自動拾いエディタのキーマップ定義挿入で、現在未定義なキーを挿入しようとした時に X-Git-Tag: v2.1.2~597 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2f7105302fd47dc64bd31e75ce88d6429b4bacad;p=hengband%2Fhengband.git 自動拾いエディタのキーマップ定義挿入で、現在未定義なキーを挿入しようとした時に クラッシュしていたバグ修正。 --- diff --git a/src/autopick.c b/src/autopick.c index 189ef081d..377be8dc2 100644 --- a/src/autopick.c +++ b/src/autopick.c @@ -5084,8 +5084,17 @@ static bool insert_keymap_line(text_body_type *tb) /* Look up the keymap */ act = keymap_act[mode][(byte)(buf[0])]; - /* Analyze the current action */ - ascii_to_text(tmp, act); + if (act) + { + /* Analyze the current action */ + ascii_to_text(tmp, act); + } + else + { + /* No keymap defined -- Use trigger key itself as a default */ + + /* Nothing to do (use tmp) */ + } /* Insert blank action preference line */ insert_return_code(tb);