mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
don't use ToNewCString in this case.
This commit is contained in:
parent
464025592f
commit
be8450481f
@ -255,16 +255,13 @@ nsresult nsBuildLocalMessageURI(const char *baseURI, PRUint32 key, char** uri)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
// need to convert mailbox://hostname/.. to mailbox_message://hostname/..
|
||||
|
||||
nsAutoString tailURI(baseURI);
|
||||
nsCAutoString tailURI(baseURI);
|
||||
|
||||
// chop off mailbox:/
|
||||
if (tailURI.Find(kMailboxRootURI) == 0)
|
||||
tailURI.Cut(0, PL_strlen(kMailboxRootURI));
|
||||
|
||||
char *tail = tailURI.ToNewCString();
|
||||
|
||||
*uri = PR_smprintf("%s%s#%d", kMailboxMessageRootURI, tail, key);
|
||||
delete[] tail;
|
||||
*uri = PR_smprintf("%s%s#%u", kMailboxMessageRootURI, tailURI.GetBuffer(), key);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user