OSDN Git Service

[Fix] #39964 Fixed the issue that spellbooks are seemed as bounties
authorHourier <hourier@users.sourceforge.jp>
Wed, 29 Apr 2020 14:44:54 +0000 (23:44 +0900)
committerHourier <hourier@users.sourceforge.jp>
Wed, 29 Apr 2020 14:44:54 +0000 (23:44 +0900)
src/autopick/autopick-pref-processor.c

index a6fbd4e..4afbcbf 100644 (file)
@@ -9,8 +9,8 @@
 void process_autopick_file_command(char *buf)
 {
        autopick_type an_entry, *entry = &an_entry;
-       int count = 0;
-       for (int i = 0; buf[i]; i++)
+       int i;
+       for (i = 0; buf[i]; i++)
        {
 #ifdef JP
                if (iskanji(buf[i]))
@@ -21,14 +21,12 @@ void process_autopick_file_command(char *buf)
 #endif
                if (iswspace(buf[i]) && buf[i] != ' ')
                        break;
-
-               count++;
        }
 
-       buf[count] = 0;
+       buf[i] = 0;
        if (!autopick_new_entry(entry, buf, FALSE)) return;
 
-       for (int i = 0; i < max_autopick; i++)
+       for (i = 0; i < max_autopick; i++)
        {
                if (!strcmp(entry->name, autopick_list[i].name)
                        && entry->flag[0] == autopick_list[i].flag[0]