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)
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue