mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 10:40:13 +01:00
Update spec_procs.c
This commit is contained in:
parent
f0d48f8507
commit
0cfdaa2081
1 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ void list_skills(struct char_data *ch)
|
|||
{
|
||||
const char *overflow = "\r\n**OVERFLOW**\r\n";
|
||||
int i, sortpos, ret;
|
||||
size_t len = 0, nlen;
|
||||
size_t len = 0;
|
||||
char buf2[MAX_STRING_LENGTH];
|
||||
|
||||
len = snprintf(buf2, sizeof(buf2), "You have %d practice session%s remaining.\r\n"
|
||||
|
|
@ -111,9 +111,9 @@ void list_skills(struct char_data *ch)
|
|||
i = spell_sort_info[sortpos];
|
||||
if (GET_LEVEL(ch) >= spell_info[i].min_level[(int) GET_CLASS(ch)]) {
|
||||
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) || ret < 0)
|
||||
if (ret < 0 || len + ret >= sizeof(buf2))
|
||||
break;
|
||||
len += nlen;
|
||||
len += ret;
|
||||
}
|
||||
}
|
||||
if (len >= sizeof(buf2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue