Fixed a crash bug in oasis_list caused by buffer overflows

This commit is contained in:
Vatiken 2012-06-27 02:53:39 +00:00
parent debf92811f
commit 170173010b

View file

@ -232,7 +232,12 @@ void perform_obj_type_list(struct char_data * ch, char *arg)
send_to_char(ch, "Not a valid item type");
return;
}
len += tmp_len;
if (len + tmp_len < sizeof(buf) - 1)
len += tmp_len;
else {
buf[sizeof(buf) -1] = '\0';
break;
}
}
}
}