Bug 803835 - Part 1: Fix address book import of CSV files with quoted fields. r+a=mbanner.
authorMike Conley <mconley@mozilla.com>
Fri, 02 Nov 2012 13:33:34 -0400
changeset 13535 bb4af80f294458facd0de373a311c18d2f9c7140
parent 13534 41b08f9271cebada4a4af8f34d92da80c4ee38f8
child 13536 8b72284c58b95ca4b50ac26a0f28472c3b75a0b7
push idunknown
push userunknown
push dateunknown
bugs803835
Bug 803835 - Part 1: Fix address book import of CSV files with quoted fields. r+a=mbanner.
mailnews/import/text/src/nsTextAddress.cpp
--- a/mailnews/import/text/src/nsTextAddress.cpp
+++ b/mailnews/import/text/src/nsTextAddress.cpp
@@ -321,16 +321,17 @@ bool nsTextAddress::GetField(const nsASt
 
     while ((pos < maxLen) && ((aLine[pos] == ' ') || (aLine[pos] == tab)))
         pos++;
 
     int32_t fLen = 0;
     int32_t startPos = pos;
     bool    quoted = false;
     if (aLine[pos] == '"') {
+        startPos++;
         fLen = -1;
         do {
             pos++;
             fLen++;
             if (((pos + 1) < maxLen) &&
                 (aLine[pos] == doubleQuote) &&
                 (aLine[pos + 1] == doubleQuote)) {
                 quoted = true;