From: Timo Sirainen Date: Wed, 4 Jun 2003 16:03:15 +0000 (+0300) Subject: imap_quote_append() shouldn't have checked previous string for lwsp X-Git-Tag: 1.1.alpha1~4571 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4017939f047b1cdbae7dc49b56304f838c4e1040;p=thirdparty%2Fdovecot%2Fcore.git imap_quote_append() shouldn't have checked previous string for lwsp --HG-- branch : HEAD --- diff --git a/src/lib-imap/imap-quote.c b/src/lib-imap/imap-quote.c index c2389a8058..90fced0ccc 100644 --- a/src/lib-imap/imap-quote.c +++ b/src/lib-imap/imap-quote.c @@ -8,7 +8,7 @@ void imap_quote_append(string_t *str, const unsigned char *value, size_t value_len) { size_t i, linefeeds = 0; - int last_lwsp, first_lwsp, literal = FALSE, modify = FALSE; + int last_lwsp = FALSE, literal = FALSE, modify = FALSE; if (value == NULL) { str_append(str, "NIL"); @@ -18,9 +18,6 @@ void imap_quote_append(string_t *str, const unsigned char *value, if (value_len == (size_t)-1) value_len = strlen((const char *) value); - i = str_len(str); - first_lwsp = last_lwsp = i > 0 && str_data(str)[i-1] == ' '; - for (i = 0; i < value_len; i++) { switch (value[i]) { case 0: @@ -57,7 +54,7 @@ void imap_quote_append(string_t *str, const unsigned char *value, if (!modify) str_append_n(str, value, value_len); else { - last_lwsp = first_lwsp; + last_lwsp = FALSE; for (i = 0; i < value_len; i++) { switch (value[i]) { case 0: