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).
This commit is contained in:
Markus Armbruster 2011-06-14 09:09:19 +02:00
parent 4a4ec917f6
commit 29d7b30b2f

View file

@ -268,8 +268,10 @@ tbl_part_done(void)
if (!ef_truncate(cur_type, cur_id + 1)) if (!ef_truncate(cur_type, cur_id + 1))
return -1; return -1;
} else { } else {
if (!may_omit_id)
return gripe("Expected %d more rows", return gripe("Expected %d more rows",
ep->fids - (cur_id + 1)); ep->fids - (cur_id + 1));
omit_ids(cur_id + 1, ep->fids);
} }
} else { } else {
exp_id = expected_id(cur_id + 1, ep->fids); exp_id = expected_id(cur_id + 1, ep->fids);