Restrict xundump to tables with a file name

Tables with a file name are: any game state, and any table that's
initialized from a .config file.

Tables that are no longer customizable: "updates" (customization had
no effect, because update_get_schedule() overwrote it), "table",
"meta" and the symbol tables (customization couldn't change them
anyway), and news-chr (customizing r_newsstory[] was kind of neat, but
unsafe because they are format strings for sprintf()).
This commit is contained in:
Markus Armbruster 2011-05-02 22:20:58 +02:00
parent 573d3fe870
commit 029d929b1b

View file

@ -784,7 +784,8 @@ xuheader(FILE *fp, int expected_table)
return gripe("Expected table `%s', not `%s'", return gripe("Expected table `%s', not `%s'",
ef_nameof(expected_table), name); ef_nameof(expected_table), name);
if (!ef_cadef(type) || !(ef_flags(type) & EFF_MEM)) { if (!empfile[type].file
|| !ef_cadef(type) || !(ef_flags(type) & EFF_MEM)) {
CANT_HAPPEN(expected_table != EF_BAD); CANT_HAPPEN(expected_table != EF_BAD);
return gripe("Table `%s' is not permitted here", name); return gripe("Table `%s' is not permitted here", name);
} }