• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisionaeef4b771b2a551eba08c8fb8390b5068639d741 (tree)
Time2019-02-04 23:32:32
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Fix] #38921 施設の職業、魔法領域制限処理についても同様に対応。 / Fix a bug of class and realm limitation using building similarly.

Change Summary

Incremental Difference

--- a/src/init1.c
+++ b/src/init1.c
@@ -3842,17 +3842,11 @@ static errr parse_line_building(char *buf)
38423842 {
38433843 int n;
38443844 n = tokenize(s + 2, MAX_CLASS, zz, 0);
3845- if (n <= MAX_CLASS)
3846- {
3847- for (i = 0; i < MAX_CLASS; i++)
3848- {
3849- building[index].member_class[i] = ((i > n) ? (CLASS_IDX)atoi(zz[i]) : 1);
3850- }
3851-
3852- break;
3845+ for (i = 0; i < MAX_CLASS; i++)
3846+ {
3847+ building[index].member_class[i] = ((i < n) ? (CLASS_IDX)atoi(zz[i]) : 1);
38533848 }
3854-
3855- return (PARSE_ERROR_TOO_FEW_ARGUMENTS);
3849+ break;
38563850 }
38573851
38583852 /* Building Races */
@@ -3872,17 +3866,11 @@ static errr parse_line_building(char *buf)
38723866 {
38733867 int n;
38743868 n = tokenize(s + 2, MAX_MAGIC, zz, 0);
3875- if (n <= MAX_MAGIC)
3869+ for (i = 0; i < MAX_MAGIC; i++)
38763870 {
3877- for (i = 0; i < MAX_MAGIC; i++)
3878- {
3879- building[index].member_realm[i+1] = ((i > n) ? (REALM_IDX)atoi(zz[i]) : 1);
3880- }
3881-
3882- break;
3871+ building[index].member_realm[i+1] = ((i < n) ? (REALM_IDX)atoi(zz[i]) : 1);
38833872 }
3884-
3885- return (PARSE_ERROR_TOO_FEW_ARGUMENTS);
3873+ break;
38863874 }
38873875
38883876 case 'Z':
Show on old repository browser