Fix empdump not to truncate game state files with fixed size

empdump -i now complains about missing rows instead of silently
truncating the file to a size the server will reject.  Affects tables
sector, nation, realms, game.
This commit is contained in:
Markus Armbruster 2011-05-02 22:27:26 +02:00
parent 0fcd935999
commit 73bd5d6aa3

View file

@ -995,8 +995,9 @@ xubody(FILE *fp)
if (CANT_HAPPEN(maxid > ep->fids))
maxid = ep->fids;
if (maxid < ep->fids) {
if (EF_IS_GAME_STATE(cur_type)
|| (cur_type >= EF_SHIP_CHR && cur_type <= EF_NUKE_CHR)) {
if (ep->nent < 0
&& (EF_IS_GAME_STATE(cur_type)
|| (cur_type >= EF_SHIP_CHR && cur_type <= EF_NUKE_CHR))) {
if (!ef_truncate(cur_type, maxid))
return -1;
} else