Oh yeah, I see now that it did that with "where sword" as well. The code for immortal where is in act.informative.c. It looks like the number of items is larger than the buffer pointer can hold. Should some bounds checking be employed to prevent the overflow from happening in the first place, I wonder.
Code:
static void perform_immort_where(struct char_data *ch, char *arg)
{
struct char_data *i;
struct obj_data *k;
struct descriptor_data *d;
int num = 0, found = 0;
if (!*arg) {
send_to_char(ch, "Players Room Location Zone\r\n");
send_to_char(ch, "-------- ------- ------------------------------ -------------------\r\n");
for (d = descriptor_list; d; d = d->next)
if (IS_PLAYING(d)) {
i = (d->original ? d->original : d->character);
if (i && CAN_SEE(ch, i) && (IN_ROOM(i) != NOWHERE)) {
if (d->original)
send_to_char(ch, "%-8s%s - [%5d] %s%s (in %s%s)\r\n",
GET_NAME(i), QNRM, GET_ROOM_VNUM(IN_ROOM(d->character)),
world[IN_ROOM(d->character)].name, QNRM, GET_NAME(d->character), QNRM);
else
send_to_char(ch, "%-8s%s %s[%s%5d%s]%s %-*s%s %s%s\r\n", GET_NAME(i), QNRM,
QCYN, QYEL, GET_ROOM_VNUM(IN_ROOM(i)), QCYN, QNRM,
30+count_color_chars(world[IN_ROOM(i)].name), world[IN_ROOM(i)].name, QNRM,
zone_table[(world[IN_ROOM(i)].zone)].name, QNRM);
}
}
} else {
for (i = character_list; i; i = i->next)
if (CAN_SEE(ch, i) && IN_ROOM(i) != NOWHERE && isname(arg, i->player.name)) {
found = 1;
send_to_char(ch, "M%3d. %-25s%s - [%5d] %-25s%s", ++num, GET_NAME(i), QNRM,
GET_ROOM_VNUM(IN_ROOM(i)), world[IN_ROOM(i)].name, QNRM);
if (SCRIPT(i) && TRIGGERS(SCRIPT(i))) {
if (!TRIGGERS(SCRIPT(i))->next)
send_to_char(ch, "[T%d] ", GET_TRIG_VNUM(TRIGGERS(SCRIPT(i))));
else
send_to_char(ch, "[TRIGS] ");
}
send_to_char(ch, "%s\r\n", QNRM);
}
for (num = 0, k = object_list; k; k = k->next)
if (CAN_SEE_OBJ(ch, k) && isname(arg, k->name)) {
found = 1;
print_object_location(++num, k, ch, TRUE);
}
if (!found)
send_to_char(ch, "Couldn't find any such thing.\r\n");
}
}