changeset 272:de8683b5bb16 HEAD

message_content_parse_header() didn't parse the header properly and just skipped all but the first parameter.
author Timo Sirainen <tss@iki.fi>
date Thu, 19 Sep 2002 20:49:11 +0300
parents bd51b6445bcd
children 9be2c12d0983
files src/lib-mail/message-content-parser.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-mail/message-content-parser.c	Thu Sep 19 20:14:34 2002 +0300
+++ b/src/lib-mail/message-content-parser.c	Thu Sep 19 20:49:11 2002 +0300
@@ -28,9 +28,10 @@
 
 	if (param_func != NULL) {
 		/* parse the parameters */
-		for (i++; i < ntokens; i = next) {
+		i++;
+		while (i < ntokens) {
 			/* find the next ';' */
-			for (next = i+1; next < ntokens; next++) {
+			for (next = i; next < ntokens; next++) {
 				if (tokens[next].token == ';')
 					break;
 			}
@@ -42,6 +43,8 @@
 				param_func(tokens + i, tokens + i + 2,
 					   next - (i+2), context);
 			}
+
+                        i = next+1;
 		}
 	}