mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Update spec_procs.c
This commit is contained in:
parent
b2db8888e3
commit
c7006f6427
1 changed files with 3 additions and 3 deletions
|
@ -99,7 +99,7 @@ const char *prac_types[] = {
|
|||
void list_skills(struct char_data *ch)
|
||||
{
|
||||
const char *overflow = "\r\n**OVERFLOW**\r\n";
|
||||
int i, sortpos;
|
||||
int i, sortpos, ret;
|
||||
size_t len = 0, nlen;
|
||||
char buf2[MAX_STRING_LENGTH];
|
||||
|
||||
|
@ -110,8 +110,8 @@ void list_skills(struct char_data *ch)
|
|||
for (sortpos = 1; sortpos <= MAX_SKILLS; sortpos++) {
|
||||
i = spell_sort_info[sortpos];
|
||||
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)));
|
||||
if (len + nlen >= sizeof(buf2) || nlen < 0)
|
||||
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)
|
||||
break;
|
||||
len += nlen;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue