mirror of
https://github.com/matrix-construct/construct
synced 2024-11-18 16:00:57 +01:00
ircd: change_nick_user_host(): only update target_p->username if the buffer has actually changed (pointed out by Valgrind)
This commit is contained in:
parent
b870a5f8e9
commit
cd66c5b922
1 changed files with 3 additions and 1 deletions
|
@ -1500,7 +1500,9 @@ change_nick_user_host(struct Client *target_p, const char *nick, const char *use
|
||||||
target_p->username, target_p->host);
|
target_p->username, target_p->host);
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_strlcpy(target_p->username, user, sizeof target_p->username);
|
if (user != target_p->username)
|
||||||
|
rb_strlcpy(target_p->username, user, sizeof target_p->username);
|
||||||
|
|
||||||
rb_strlcpy(target_p->host, host, sizeof target_p->host);
|
rb_strlcpy(target_p->host, host, sizeof target_p->host);
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
|
|
Loading…
Reference in a new issue