Bad and useless strncat use (reported by psychon, thanks to him)
This commit is contained in:
parent
015969e86b
commit
7af35a3018
10
src/irc.c
10
src/irc.c
@ -126,18 +126,18 @@ list_t *channel_name_list(struct channel *c)
|
||||
len = 0;
|
||||
}
|
||||
if (len != 0) {
|
||||
strncat(str, " ", NAMESIZE);
|
||||
strcat(str, " ");
|
||||
len++;
|
||||
}
|
||||
if (ovmask & NICKOP)
|
||||
strncat(str, "@", NAMESIZE);
|
||||
strcat(str, "@");
|
||||
else if (ovmask & NICKHALFOP)
|
||||
strncat(str, "%", NAMESIZE);
|
||||
strncat(str, "%");
|
||||
else if (ovmask & NICKVOICED)
|
||||
strncat(str, "+", NAMESIZE);
|
||||
strcat(str, "+");
|
||||
len++;
|
||||
|
||||
strncat(str, nick, NAMESIZE);
|
||||
strncat(str, nick);
|
||||
len += strlen(nick);
|
||||
assert(len < NAMESIZE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user