OSDN Git Service

自動拾いエディタのキーマップ定義挿入で、現在未定義なキーを挿入しようとした時に
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 22 Jan 2004 10:34:39 +0000 (10:34 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 22 Jan 2004 10:34:39 +0000 (10:34 +0000)
クラッシュしていたバグ修正。

src/autopick.c

index 189ef08..377be8d 100644 (file)
@@ -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);