From 42c4f4799a66f148166262b3993b2374045a9f24 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Mon, 27 Feb 2012 00:45:39 +0000 Subject: Only use nicknames once they're zero terminated ;) --- vchat-protocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vchat-protocol.c b/vchat-protocol.c index 55c8b55..b9a5e15 100755 --- a/vchat-protocol.c +++ b/vchat-protocol.c @@ -209,12 +209,12 @@ pubaction (char *message) nick = strchr (message, ' '); nick[0] = '\0'; nick++; - ul_public_action(nick); action = strchr (nick, ' '); action[0] = '\0'; action++; + ul_public_action(nick); snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBACTION),nick,action); writechan (tmpstr); } @@ -230,12 +230,12 @@ pubthoughts (char *message) nick = strchr (message, ' '); nick[0] = '\0'; nick++; - ul_public_action(nick); thoughts = strchr (nick, ' '); thoughts[0] = '\0'; thoughts++; + ul_public_action(nick); snprintf(tmpstr,TMPSTRSIZE,getformatstr(FS_PUBTHOUGHT),nick,thoughts); writechan (tmpstr); } @@ -316,7 +316,6 @@ topicchange (char *message) /* search start of nickname */ nick = strchr (message, ' '); nick++; - ul_public_action(nick); /* search start of message before topic, terminate nick */ topic = strchr (nick, ' '); @@ -333,6 +332,7 @@ topicchange (char *message) if (topic[len-1] == '\'') topic[len-1] = '\0'; + ul_public_action(nick); /* show change in topic window */ snprintf (topicstr, TOPICSTRSIZE, getformatstr(FS_TOPICW), ownchan, topic); topicline(NULL); -- cgit v1.2.3