OSDN Git Service

[Fix] #38921 施設の種族制限処理が起こしていたエンバグに対応。 / Fix a bug of race limitation using building.
authorDeskull <deskull@users.sourceforge.jp>
Mon, 4 Feb 2019 14:23:57 +0000 (23:23 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Mon, 4 Feb 2019 14:23:57 +0000 (23:23 +0900)
src/init1.c

index c2e6d23..ba57d8d 100644 (file)
@@ -3860,17 +3860,11 @@ static errr parse_line_building(char *buf)
                {
                        int n;
                        n = tokenize(s + 2, MAX_RACES, zz, 0);
-                       if (n <= MAX_RACES)
+                       for (i = 0; i < MAX_RACES; i++)
                        {
-                               for (i = 0; i < MAX_RACES; i++)
-                               {
-                                       building[index].member_race[i] = ((i > n) ? (RACE_IDX)atoi(zz[i]) : 1);
-                               }
-
-                               break;
+                               building[index].member_race[i] = ((i < n) ? (RACE_IDX)atoi(zz[i]) : 1);
                        }
-
-                       return (PARSE_ERROR_TOO_FEW_ARGUMENTS);
+                       break;
                }
 
                /* Building Realms */