From 05364c0f6835c08cdaecf5ec50cd31f510c5fff9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 19 Jul 2008 11:47:06 -0400 Subject: [PATCH] Avoid cryptic message when survey's first argument is empty Catch empty argument instead of letting nstr_comp_val() choke on it. --- src/lib/commands/surv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/commands/surv.c b/src/lib/commands/surv.c index d3a27e8d..92117a7d 100644 --- a/src/lib/commands/surv.c +++ b/src/lib/commands/surv.c @@ -66,7 +66,7 @@ surv(void) nsect = 0; ptr = getstarg(player->argp[1], "commodity or variable? ", buf); - if (ptr == 0) + if (!ptr || !*ptr) return RET_SYN; ptr = nstr_comp_val(ptr, &val, EF_SECTOR); if (!ptr)