settings.c
changeset 2953 4d933ef9a41f
parent 2952 58522ed8f0f1
child 2969 8de286ea87e8
equal deleted inserted replaced
2952:58522ed8f0f1 2953:4d933ef9a41f
   128 static IniGroup *ini_group_alloc(IniFile *ini, const char *grpt, int len)
   128 static IniGroup *ini_group_alloc(IniFile *ini, const char *grpt, int len)
   129 {
   129 {
   130 	IniGroup *grp = pool_alloc(&ini->pool, sizeof(IniGroup));
   130 	IniGroup *grp = pool_alloc(&ini->pool, sizeof(IniGroup));
   131 	grp->ini = ini;
   131 	grp->ini = ini;
   132 	grp->name = pool_strdup(&ini->pool, grpt, len);
   132 	grp->name = pool_strdup(&ini->pool, grpt, len);
   133 	if(!strcmp(grp->name, "newgrf") || !strcmp(grp->name, "servers") || !strcmp(grp->name, "bans") )
   133 	if (!strcmp(grp->name, "newgrf") || !strcmp(grp->name, "servers") || !strcmp(grp->name, "bans")) {
   134 		grp->type = IGT_LIST;
   134 		grp->type = IGT_LIST;
   135 	else
   135 	} else {
   136 		grp->type = IGT_VARIABLES;
   136 		grp->type = IGT_VARIABLES;
       
   137 	}
   137 	grp->next = NULL;
   138 	grp->next = NULL;
   138 	grp->item = NULL;
   139 	grp->item = NULL;
   139 	grp->comment = NULL;
   140 	grp->comment = NULL;
   140 	grp->last_item = &grp->item;
   141 	grp->last_item = &grp->item;
   141 	*ini->last_group = grp;
   142 	*ini->last_group = grp;