tried to fix parse_lines #3
authorpk910 <philipp@zoelle1.de>
Wed, 10 Aug 2011 00:53:04 +0000 (02:53 +0200)
committerpk910 <philipp@zoelle1.de>
Wed, 10 Aug 2011 00:53:04 +0000 (02:53 +0200)
IRCParser.c

index 27bcaf6b0115027ffd60b563c8196889bfe77172..899a10e5b706b90225ada51813b6dc5137578136 100644 (file)
@@ -16,9 +16,10 @@ int parse_lines(struct ClientSocket *client, char *lines, int len) {
             lines[i] = 0;
         if(lines[i] == '\n') {
             lines[i] = 0;
+            startpos = strlen(lines); //save length of the current line
             parse_line(client, lines);
-            lines += strlen(lines)+1;
-            printf("SKIP %lu: %s\n", (unsigned long) strlen(lines)+1, lines);
+            lines += startpos+1;
+            printf("SKIP %d: %s\n", startpos+1, lines);
             startpos = i+1;
         }
     }