diff options
author | June McEnroe <june@causal.agency> | 2019-10-29 22:54:28 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-10-29 22:54:28 -0400 |
commit | ccfd8b843616d83c536b22a081dfd743c9faf199 (patch) | |
tree | 6953aa0baf99a2fd439036fe0a965fb5f5dacf14 | |
parent | Update self origin on nick change (diff) | |
download | pounce-ccfd8b843616d83c536b22a081dfd743c9faf199.tar.gz pounce-ccfd8b843616d83c536b22a081dfd743c9faf199.zip |
Do not duplicate origin on nick change
Oops!
-rw-r--r-- | state.c | 3 |
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) { |