fail when there are borders that can't be read because their endpoints are missing

This commit is contained in:
Enno Rehling 2016-08-14 15:46:27 +02:00
parent abd6600cfe
commit e5f5dc6aa4
2 changed files with 4 additions and 2 deletions

View File

@ -21,3 +21,5 @@ for k,v in ipairs(ids) do
p:erase()
end
eressea.write_game(get_turn() .. '.new')
eressea.free_game()
eressea.read_game(get_turn() .. '.new')

View File

@ -633,8 +633,8 @@ int read_borders(gamedata *data)
from = findregionbyid(fid);
to = findregionbyid(tid);
if (!to || !from) {
log_warning("%s connection between incomplete regions %d and %d", zText, fid, tid);
continue;
log_error("%s connection between missing regions %d and %d", zText, fid, tid);
assert((to && from) || !"connection between missing regions");
}
}