From 29d7b30b2f7d9a21c2b8685fe6fc6a273b58837f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 14 Jun 2011 09:09:19 +0200 Subject: [PATCH] Permit omitting rows at the end of tables nat and game When not enough rows are supplied for a table with fixed size, treat the rows missing at the end just like rows omitted elsewhere: make them blank if the omission is permitted (tables nat and game), else fail (tables sect and realm; no change). --- src/lib/common/xundump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index e361c8bc..387c721c 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -268,8 +268,10 @@ tbl_part_done(void) if (!ef_truncate(cur_type, cur_id + 1)) return -1; } else { - return gripe("Expected %d more rows", - ep->fids - (cur_id + 1)); + if (!may_omit_id) + return gripe("Expected %d more rows", + ep->fids - (cur_id + 1)); + omit_ids(cur_id + 1, ep->fids); } } else { exp_id = expected_id(cur_id + 1, ep->fids);