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

This commit is contained in:
jst%mozilla.jstenback.com 2004-01-14 19:26:17 +00:00
parent 7881540959
commit 05f83fbe5d

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);
}
}