fixing bug 60739 r=blizzard sr=shaver

This commit is contained in:
pavlov%netscape.com 2001-02-07 06:37:59 +00:00
parent 203cad2e8b
commit e29100a3dc

View File

@ -921,6 +921,8 @@ void nsClipboard::SelectionGetCB(GtkWidget *widget,
nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
rv = ccm->GetUnicodeEncoder(&platformCharset, getter_AddRefs(encoder));
encoder->SetOutputErrorBehavior(nsIUnicodeEncoder::kOnError_Replace, nsnull, '?');
// Estimate out length and allocate the buffer based on a worst-case estimate, then do
// the conversion.
PRUnichar *castedData = NS_REINTERPRET_CAST(PRUnichar*, clipboardData);