forked from github/server
Merge pull request #530 from ennorehling/develop
fix logging, old datafiles
This commit is contained in:
commit
0d54a2da35
|
@ -651,17 +651,12 @@ int read_borders(gamedata *data)
|
||||||
if (r != NULL)
|
if (r != NULL)
|
||||||
to = r;
|
to = r;
|
||||||
}
|
}
|
||||||
if ((type->read && !type->write)) {
|
if (type->read) {
|
||||||
log_warning("ignore invalid border '%s' between '%s' and '%s'\n", zText, regionname(from, 0), regionname(to, 0));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
connection *b = new_border(type, from, to);
|
connection *b = new_border(type, from, to);
|
||||||
nextborder--; /* new_border erhöht den Wert */
|
nextborder--; /* new_border erhöht den Wert */
|
||||||
b->id = bid;
|
b->id = bid;
|
||||||
assert(bid <= nextborder);
|
assert(bid <= nextborder);
|
||||||
if (type->read) {
|
type->read(b, data);
|
||||||
type->read(b, data);
|
|
||||||
}
|
|
||||||
if (data->version < NOBORDERATTRIBS_VERSION) {
|
if (data->version < NOBORDERATTRIBS_VERSION) {
|
||||||
attrib *a = NULL;
|
attrib *a = NULL;
|
||||||
int result = read_attribs(data, &a, b);
|
int result = read_attribs(data, &a, b);
|
||||||
|
@ -675,6 +670,9 @@ int read_borders(gamedata *data)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!type->write) {
|
||||||
|
log_warning("invalid border '%s' between '%s' and '%s'\n", zText, regionname(from, 0), regionname(to, 0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue