From 73bd5d6aa3bb798b5d48aac0f7635414b391497c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 2 May 2011 22:27:26 +0200 Subject: [PATCH] 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. --- src/lib/common/xundump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index fb6ea7ad..97a3eed1 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -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