fixed helpcheck bug where, if all commands have help entries, garbage was displayed

This commit is contained in:
Rhade 2011-03-06 01:18:10 +00:00
parent 6f88f62e76
commit 7fab30f86b

View file

@ -361,7 +361,6 @@ ACMD(do_helpcheck)
int i, count = 0;
size_t len = 0, nlen;
send_to_char(ch, "Commands without help entries:\r\n");
for (i = 1; *(complete_cmd_info[i].command) != '\n'; i++) {
if (complete_cmd_info[i].command_pointer != do_action && complete_cmd_info[i].minimum_level >= 0) {
@ -377,10 +376,14 @@ ACMD(do_helpcheck)
if (count % 3 && len < sizeof(buf))
nlen = snprintf(buf + len, sizeof(buf) - len, "\r\n");
if (ch->desc)
if (ch->desc) {
if (len == 0)
send_to_char(ch, "All commands have help entries.\r\n");
else {
send_to_char(ch, "Commands without help entries:\r\n");
page_string(ch->desc, buf, TRUE);
*buf = '\0';
}
}
}
ACMD(do_hindex)