From: Markus Armbruster Date: Wed, 26 Oct 2011 18:00:00 +0000 (+0200) Subject: Make play show no last command when there hasn't been one X-Git-Tag: v4.3.29~51 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=354664eef28d8bc98b9cdcd2932033849bd385e9 Make play show no last command when there hasn't been one Before, it printed NULL, which isn't helpful. --- diff --git a/src/lib/commands/play.c b/src/lib/commands/play.c index a0a79a29a..c28336898 100644 --- a/src/lib/commands/play.c +++ b/src/lib/commands/play.c @@ -29,6 +29,7 @@ * Known contributors to this file: * Ken Stevens, 1995 * Steve McClure, 1998 + * Markus Armbruster, 2005-2011 */ #include @@ -105,17 +106,13 @@ play_list(struct player *joe) (long)(now - joe->curup)); if (player->god) { - if (!joe->combuf || !*joe->combuf) - pr(" NULL\n"); - else { - n = ufindpfx(joe->combuf, 20); - if (CANT_HAPPEN(n + 3u > sizeof(com))) { - pr(" BUGGY\n"); - return 1; - } - sprintf(com, " %.*s\n", n, joe->combuf); - uprnf(com); + n = ufindpfx(joe->combuf, 20); + if (CANT_HAPPEN(n + 3u > sizeof(com))) { + pr(" BUGGY\n"); + return 1; } + sprintf(com, " %.*s\n", n, joe->combuf); + uprnf(com); } else pr("\n");