From 2723638b80cfdbad9cdc522f18deeba0af691190 Mon Sep 17 00:00:00 2001 From: pk910 Date: Wed, 10 Aug 2011 02:55:58 +0200 Subject: [PATCH] tried to fix parse_lines #4 --- IRCParser.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/IRCParser.c b/IRCParser.c index 899a10e..40edec9 100644 --- a/IRCParser.c +++ b/IRCParser.c @@ -16,10 +16,9 @@ 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 += startpos+1; - printf("SKIP %d: %s\n", startpos+1, lines); + lines += i-startpos+1; + printf("SKIP %d: %s\n", i-startpos+1, lines); startpos = i+1; } } -- 2.20.1