From: Markus Armbruster Date: Sun, 1 May 2011 12:09:35 +0000 (+0200) Subject: Fix empdump to open views, too X-Git-Tag: v4.3.28~71 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=516ab86a6e1f394ccad9481ef834c1578680822a Fix empdump to open views, too ef_verify() assumes views are open. Bug is harmless, because ef_nelem() returns zero for closed views, and ef_verify() accesses only immutable parts of struct empfile then. --- diff --git a/src/util/empdump.c b/src/util/empdump.c index 2651f917e..3fcd4c7f5 100644 --- a/src/util/empdump.c +++ b/src/util/empdump.c @@ -131,10 +131,13 @@ main(int argc, char *argv[]) global_init(); for (i = 0; i < EF_MAX; i++) { - if (!EF_IS_GAME_STATE(i)) - continue; - if (!ef_open(i, EFF_MEM | private, -1)) - exit(1); + if (EF_IS_GAME_STATE(i)) { + if (!ef_open(i, EFF_MEM | private, -1)) + exit(1); + } else if (EF_IS_VIEW(i)) { + if (ef_open_view(i) < 0) + exit(1); + } } /* import from IMPORT */