]> git.pond.sub.org Git - empserver/blobdiff - src/lib/common/xdump.c
Fix empdump not to depend on POGO's origin
[empserver] / src / lib / common / xdump.c
index c29c216faf8b5bc3d363987266a72bb9fbdd401a..edc1059cd637d87d1f64b06617f8e2f5de13e6f0 100644 (file)
@@ -82,7 +82,8 @@
 #include "xdump.h"
 
 /*
- * Initialize XD to dump for country CNUM.
+ * Initialize XD.
+ * Translate dump for country CNUM, except when CNUM is NATID_BAD.
  * If HUMAN, dump in human-readable format.
  * Dump is to be delivered through callback PR.
  * Return XD.
@@ -91,7 +92,7 @@ struct xdstr *
 xdinit(struct xdstr *xd, natid cnum, int human, void (*pr)(char *fmt, ...))
 {
     xd->cnum = cnum;
-    xd->divine = getnatp(cnum)->nat_stat == STAT_GOD;
+    xd->divine = cnum == NATID_BAD || getnatp(cnum)->nat_stat == STAT_GOD;
     xd->human = human;
     xd->pr = pr;
     return xd;