about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-29 22:54:28 -0400
committerJune McEnroe <june@causal.agency>2019-10-29 22:54:28 -0400
commitccfd8b843616d83c536b22a081dfd743c9faf199 (patch)
tree6953aa0baf99a2fd439036fe0a965fb5f5dacf14
parentUpdate self origin on nick change (diff)
downloadpounce-ccfd8b843616d83c536b22a081dfd743c9faf199.tar.gz
pounce-ccfd8b843616d83c536b22a081dfd743c9faf199.zip
Do not duplicate origin on nick change
Oops!
Diffstat (limited to '')
-rw-r--r--state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/state.c b/state.c
index f51a09b..50afb26 100644
--- a/state.c
+++ b/state.c
@@ -268,7 +268,8 @@ static void handleNick(struct Message *msg) {
 	char *origin = malloc(size);
 	if (!origin) err(EX_OSERR, "malloc");
 	snprintf(origin, size, "%s%s", self.nick, rest);
-	set(&self.origin, origin);
+	free(self.origin);
+	self.origin = origin;
 }
 
 static void handleJoin(struct Message *msg) {