bug 275080 : cannot print (javascript : window) with a printer with non-Latin1 characters in its name : patch by masayuki (r=jshin, sr=bzbarsky)

This commit is contained in:
jshin%mailaps.org 2006-02-07 01:14:57 +00:00
parent 491e68f470
commit e422b4539f

View File

@ -912,8 +912,8 @@ nsPrinterEnumeratorWin::EnumeratePrinters(PRUint32* aCount, PRUnichar*** aResult
PRInt32 printerInx = 0;
while( count < numItems ) {
LPTSTR name = GlobalPrinters::GetInstance()->GetItemFromList(printerInx++);
nsString newName;
newName.AssignWithConversion(name);
nsAutoString newName;
NS_CopyNativeToUnicode(nsDependentCString(name), newName);
PRUnichar *str = ToNewUnicode(newName);
if (!str) {
CleanupArray(array, count);