Added new zone creation limits to prevent misuse of zedit making the MUD unbootable. --Rumble

This commit is contained in:
Rumble 2009-01-25 22:16:21 +00:00
parent 62e698b51f
commit 65b23ad812
2 changed files with 13 additions and 1 deletions

View file

@ -35,6 +35,9 @@ export (QQ's a zone into a tarball)t
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
(lots of major bugfixes too)
tbaMUD 3.59
[Jan 25 2009] - Rumble
Added new documentation /doc unixshelladminguide. (thanks Jamdog).
Added new zone creation limits to prevent misuse of zedit making the MUD unbootable.
[Jan 25 2009] - Jamdog
Added cases for missing object types in oedit_disp_val1_menu (other, worn, treasure, trash, key, pen, boat)
[Jan 25 2009] - Rumble

View file

@ -51,17 +51,26 @@ zone_rnum create_new_zone(zone_vnum vzone_num, room_vnum bottom, room_vnum top,
{
FILE *fp;
struct zone_data *zone;
int i;
int i, max_zone;
zone_rnum rznum;
char buf[MAX_STRING_LENGTH];
#if CIRCLE_UNSIGNED_INDEX
max_zone = 655;
if (vzone_num == NOWHERE) {
#else
max_zone = 327;
if (vzone_num < 0) {
#endif
*error = "You can't make negative zones.\r\n";
return NOWHERE;
} else if (vzone_num > max_zone) {
#if CIRCLE_UNSIGNED_INDEX
*error = "New zone cannot be higher than 655.\r\n";
#else
*error = "New zone cannot be higher than 327.\r\n";
#endif
return NOWHERE;
} else if (bottom > top) {
*error = "Bottom room cannot be greater than top room.\r\n";
return NOWHERE;