forked from github/server
Fix für Santa, wenn region 0,0 nicht existiert :-)
This commit is contained in:
parent
8cde4d6104
commit
1f9a8a03dc
|
@ -48,7 +48,9 @@ int
|
||||||
xmas2002(void)
|
xmas2002(void)
|
||||||
{
|
{
|
||||||
region * r = findregion(0, 0);
|
region * r = findregion(0, 0);
|
||||||
unit * santa = make_santa(r);
|
unit * santa;
|
||||||
|
if (r==NULL) r = regions;
|
||||||
|
santa = make_santa(r);
|
||||||
|
|
||||||
santa_comes_to_town(r, santa, presents);
|
santa_comes_to_town(r, santa, presents);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -328,7 +328,7 @@ read_newfactions(const char * filename)
|
||||||
if (fscanf(F, "%s %s %s %d %d %s", email, race, lang, &bonus, &subscription, password)<=0) break;
|
if (fscanf(F, "%s %s %s %d %d %s", email, race, lang, &bonus, &subscription, password)<=0) break;
|
||||||
#endif
|
#endif
|
||||||
while (f) {
|
while (f) {
|
||||||
if (strcmp(f->email, email)==0 && f->age==0) {
|
if (strcmp(f->email, email)==0 && f->subscription) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
f = f->next;
|
f = f->next;
|
||||||
|
|
Loading…
Reference in New Issue