Make play show no last command when there hasn't been one

Before, it printed NULL, which isn't helpful.
This commit is contained in:
Markus Armbruster 2011-10-26 20:00:00 +02:00
parent 11d6e8ce80
commit 354664eef2

View file

@ -29,6 +29,7 @@
* Known contributors to this file: * Known contributors to this file:
* Ken Stevens, 1995 * Ken Stevens, 1995
* Steve McClure, 1998 * Steve McClure, 1998
* Markus Armbruster, 2005-2011
*/ */
#include <config.h> #include <config.h>
@ -105,17 +106,13 @@ play_list(struct player *joe)
(long)(now - joe->curup)); (long)(now - joe->curup));
if (player->god) { if (player->god) {
if (!joe->combuf || !*joe->combuf) n = ufindpfx(joe->combuf, 20);
pr(" NULL\n"); if (CANT_HAPPEN(n + 3u > sizeof(com))) {
else { pr(" BUGGY\n");
n = ufindpfx(joe->combuf, 20); return 1;
if (CANT_HAPPEN(n + 3u > sizeof(com))) {
pr(" BUGGY\n");
return 1;
}
sprintf(com, " %.*s\n", n, joe->combuf);
uprnf(com);
} }
sprintf(com, " %.*s\n", n, joe->combuf);
uprnf(com);
} else } else
pr("\n"); pr("\n");