fixed WHOHandler (NULL + 1 can not be NULL ...)
authorpk910 <philipp@zoelle1.de>
Sun, 23 Oct 2011 18:41:00 +0000 (20:41 +0200)
committerpk910 <philipp@zoelle1.de>
Sun, 23 Oct 2011 18:41:00 +0000 (20:41 +0200)
src/WHOHandler.c

index 3bf9158c27a2adc9b29a79fe53419b0c3def77bd..759445bf04e37d2fcff02047d23a4ae55bdd874e 100644 (file)
@@ -270,8 +270,9 @@ void recv_whohandler_354(struct ClientSocket *client, char **argv, unsigned int
 
 void recv_whohandler_315(struct ClientSocket *client, char **argv, unsigned int argc) {
     if(argc < 2) return;
-    char *typestr = strstr(argv[1], ",") + 1;
+    char *typestr = strstr(argv[1], ",");
     if(!typestr) return;
+    typestr++;
     int type = atoi(typestr);
     if(!(type & WHOQUEUETYPE_ISONQUEUE)) return;
     struct WHOQueueEntry* entry = getNextWHOQueueEntry(client, 1);