mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-26 21:41:45 +01:00
Fix olist crasher.
This commit is contained in:
@@ -292,6 +292,8 @@ void perform_obj_aff_list(struct char_data * ch, char *arg)
|
|||||||
QYEL, item_types[obj_proto[num].obj_flags.type_flag], QNRM,
|
QYEL, item_types[obj_proto[num].obj_flags.type_flag], QNRM,
|
||||||
obj_proto[num].proto_script ? " [TRIG]" : "");
|
obj_proto[num].proto_script ? " [TRIG]" : "");
|
||||||
len += tmp_len;
|
len += tmp_len;
|
||||||
|
if (len > sizeof(buf))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
page_string(ch->desc, buf, TRUE);
|
page_string(ch->desc, buf, TRUE);
|
||||||
@@ -344,6 +346,8 @@ void perform_obj_name_list(struct char_data * ch, char *arg)
|
|||||||
obj_proto[num].short_description, QYEL, item_types[obj_proto[num].obj_flags.type_flag], QNRM,
|
obj_proto[num].short_description, QYEL, item_types[obj_proto[num].obj_flags.type_flag], QNRM,
|
||||||
obj_proto[num].proto_script ? " [TRIG]" : "");
|
obj_proto[num].proto_script ? " [TRIG]" : "");
|
||||||
len += tmp_len;
|
len += tmp_len;
|
||||||
|
if (len > sizeof(buf))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -690,7 +694,6 @@ static void list_objects(struct char_data *ch, zone_rnum rnum, obj_vnum vmin, ob
|
|||||||
item_types[obj_proto[i].obj_flags.type_flag], QNRM,
|
item_types[obj_proto[i].obj_flags.type_flag], QNRM,
|
||||||
obj_proto[i].proto_script ? " [TRIG]" : ""
|
obj_proto[i].proto_script ? " [TRIG]" : ""
|
||||||
);
|
);
|
||||||
|
|
||||||
if (len > sizeof(buf))
|
if (len > sizeof(buf))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -780,11 +783,14 @@ static void list_zones(struct char_data *ch, zone_rnum rnum, zone_vnum vmin, zon
|
|||||||
for (i = 0; i <= top_of_zone_table; i++) {
|
for (i = 0; i <= top_of_zone_table; i++) {
|
||||||
if (zone_table[i].number >= bottom && zone_table[i].number <= top) {
|
if (zone_table[i].number >= bottom && zone_table[i].number <= top) {
|
||||||
if ((!use_name) || (is_name(name, zone_table[i].builders))) {
|
if ((!use_name) || (is_name(name, zone_table[i].builders))) {
|
||||||
|
counter++;
|
||||||
|
|
||||||
tmp_len = snprintf(buf+len, sizeof(buf)-len, "[%s%3d%s] %s%-*s %s%-1s%s\r\n",
|
tmp_len = snprintf(buf+len, sizeof(buf)-len, "[%s%3d%s] %s%-*s %s%-1s%s\r\n",
|
||||||
QGRN, zone_table[i].number, QNRM, QCYN, count_color_chars(zone_table[i].name)+30, zone_table[i].name,
|
QGRN, zone_table[i].number, QNRM, QCYN, count_color_chars(zone_table[i].name)+30, zone_table[i].name,
|
||||||
QYEL, zone_table[i].builders ? zone_table[i].builders : "None.", QNRM);
|
QYEL, zone_table[i].builders ? zone_table[i].builders : "None.", QNRM);
|
||||||
len += tmp_len;
|
len += tmp_len;
|
||||||
counter++;
|
if (len > sizeof(buf))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user