X-Git-Url: http://git.pond.sub.org/?p=empserver;a=blobdiff_plain;f=src%2Flib%2Fcommands%2Fload.c;fp=src%2Flib%2Fcommands%2Fload.c;h=62847837df286386c3176119ab64439681452c84;hp=b3e9b60c1e4899945e214a21b44312359cc61eb7;hb=1f6b79dd10c841d99d8cf5e94528edb45af19592;hpb=b770ac4ba82d742713ec4f39e50efa7e8a3005f2 diff --git a/src/lib/commands/load.c b/src/lib/commands/load.c index b3e9b60c1..62847837d 100644 --- a/src/lib/commands/load.c +++ b/src/lib/commands/load.c @@ -30,7 +30,7 @@ * David Sharnoff, 1987 * Ken Stevens, 1995 (rewritten) * Steve McClure, 1998-2000 - * Markus Armbruster, 2004-2018 + * Markus Armbruster, 2004-2021 */ #include @@ -79,12 +79,12 @@ c_load(void) "What commodity (or 'plane' or 'land')? ", buf); if (!p || !*p) return RET_SYN; - + ich = item_by_name(p); if (!strncmp(p, "plane", 5)) type = EF_PLANE; else if (!strncmp(p, "land", 4)) type = EF_LAND; - else if (NULL != (ich = item_by_name(p))) + else if (ich) type = EF_SECTOR; else { pr("Can't %sload '%s'\n", loading ? "" : "un", p); @@ -208,11 +208,12 @@ c_lload(void) "What commodity (or 'plane' or 'land')? ", buf); if (!p || !*p) return RET_SYN; + ich = item_by_name(p); if (!strncmp(p, "plane", 5)) type = EF_PLANE; else if (!strncmp(p, "land", 4)) type = EF_LAND; - else if (NULL != (ich = item_by_name(p))) + else if (ich) type = EF_SECTOR; else { pr("Can't %sload '%s'\n", loading ? "" : "un", p);