diff options
-rw-r--r-- | weechat/net.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/weechat/net.c b/weechat/net.c index 1618130..bab7f3a 100644 --- a/weechat/net.c +++ b/weechat/net.c @@ -273,8 +273,9 @@ void net_handle_recv(int fd,const char *msg){ } const char *roomp=p+1; p=strchr(roomp,' '); - const char *q,*r; - if(p==NULL||(q=strchr(p+1,' '))==NULL||(r=strchr(q+1,' '))==NULL){ + const char *q,*r,*s; + if(p==NULL||(q=strchr(p+1,' '))==NULL||(r=strchr(q+1,' '))==NULL + ||(s=strchr(r+1,' '))==NULL){ fprintf(debugf,"net_handle_recv: not enough arguments to 'history_message' <%s>\n",msg); return; } @@ -283,9 +284,13 @@ void net_handle_recv(int fd,const char *msg){ i64 usernamelen=q-usernamep; const char *stampp=q+1; i64 stamplen=r-stampp; - const char *textp=r+1; + const char *msgidp=r+1; + i64 msgidlen=s-msgidp; + const char *textp=s+1; i64 textlen=msglen-(textp-msg); + (void)msgidp; (void)msgidlen; + struct net_response res; res.type=NET_HISTORY; const char *endp; |