From a34b08b1d63154715f0109a74ec0a0c38800682a Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Thu, 18 Nov 1999 10:16:26 +0000 Subject: [PATCH] minor tweak to properly remove everything after (and including) the ? from a mailto url when extracting the to part. --- mailnews/compose/src/nsSmtpUrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailnews/compose/src/nsSmtpUrl.cpp b/mailnews/compose/src/nsSmtpUrl.cpp index e953283623ec..cbfa7a9764e1 100644 --- a/mailnews/compose/src/nsSmtpUrl.cpp +++ b/mailnews/compose/src/nsSmtpUrl.cpp @@ -230,13 +230,13 @@ nsresult nsMailtoUrl::ParseUrl() { // now parse out the search field... nsCAutoString searchPart; - m_toPart.Mid(searchPart, startOfSearchPart, -1); + PRUint32 numExtraChars = m_toPart.Mid(searchPart, startOfSearchPart, -1); if (!searchPart.IsEmpty()) { ParseMailtoUrl(searchPart); // now we need to strip off the search part from the // to part.... - m_toPart.Cut(startOfSearchPart, -1); + m_toPart.Cut(startOfSearchPart, numExtraChars); } } else if (!m_toPart.IsEmpty())