Update spec_procs.c

This commit is contained in:
Rumble 2013-12-27 20:33:40 -05:00
parent b2db8888e3
commit c7006f6427

View file

@ -99,7 +99,7 @@ const char *prac_types[] = {
void list_skills(struct char_data *ch) void list_skills(struct char_data *ch)
{ {
const char *overflow = "\r\n**OVERFLOW**\r\n"; const char *overflow = "\r\n**OVERFLOW**\r\n";
int i, sortpos; int i, sortpos, ret;
size_t len = 0, nlen; size_t len = 0, nlen;
char buf2[MAX_STRING_LENGTH]; char buf2[MAX_STRING_LENGTH];
@ -110,8 +110,8 @@ void list_skills(struct char_data *ch)
for (sortpos = 1; sortpos <= MAX_SKILLS; sortpos++) { for (sortpos = 1; sortpos <= MAX_SKILLS; sortpos++) {
i = spell_sort_info[sortpos]; i = spell_sort_info[sortpos];
if (GET_LEVEL(ch) >= spell_info[i].min_level[(int) GET_CLASS(ch)]) { if (GET_LEVEL(ch) >= spell_info[i].min_level[(int) GET_CLASS(ch)]) {
nlen = snprintf(buf2 + len, sizeof(buf2) - len, "%-20s %s\r\n", spell_info[i].name, how_good(GET_SKILL(ch, i))); ret = snprintf(buf2 + len, sizeof(buf2) - len, "%-20s %s\r\n", spell_info[i].name, how_good(GET_SKILL(ch, i)));
if (len + nlen >= sizeof(buf2) || nlen < 0) if (len + nlen >= sizeof(buf2) || ret < 0)
break; break;
len += nlen; len += nlen;
} }