mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
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:
parent
7881540959
commit
05f83fbe5d
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user