]> PatchyGit - patchyircd.git/commitdiff
fix segfault. this variable was aptly named
authorEgor <egor@patchysicp.xyz>
Mon, 2 May 2022 20:38:30 +0000 (23:38 +0300)
committerEgor <egor@patchysicp.xyz>
Mon, 2 May 2022 20:38:30 +0000 (23:38 +0300)
irc.c

diff --git a/irc.c b/irc.c
index 5531448..52cae31 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -257,7 +257,7 @@ void setNick(struct client_data *client, char* nickname, size_t size) {
        // TODO: perform basic sanitization
 
        char *bruh = strchr(nickname, ' '); // FIXME: we should reject those tbh
-       if (*bruh)
+       if (bruh)
                *bruh = 0;
 
        // Start GitHub Copilot