Fixing bug 230849. Making LossyCopyUTF16toASCII() and CopyASCIItoUTF8() truncate the destination even when the source is null. r=jshin@mailaps.org, sr=peterv@propagandism.org

git-svn-id: svn://10.0.0.236/trunk@151318 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com 2004-01-14 19:26:17 +00:00
parent c01faa67a5
commit 96f9ed73f3

View File

@ -166,8 +166,8 @@ NS_COM
void
LossyCopyUTF16toASCII( const PRUnichar* aSource, nsACString& aDest )
{
aDest.Truncate();
if (aSource) {
aDest.Truncate();
LossyAppendUTF16toASCII(nsDependentString(aSource), aDest);
}
}
@ -176,8 +176,8 @@ NS_COM
void
CopyASCIItoUTF16( const char* aSource, nsAString& aDest )
{
aDest.Truncate();
if (aSource) {
aDest.Truncate();
AppendASCIItoUTF16(nsDependentCString(aSource), aDest);
}
}