mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 744541. r=bz
This commit is contained in:
parent
18fdf8f122
commit
4af073ffde
@ -564,9 +564,9 @@ nsNativeCharsetConverter::UnicodeToNative(const PRUnichar **input,
|
||||
if (gUnicodeToNative != INVALID_ICONV_T) {
|
||||
res = xp_iconv(gUnicodeToNative, (const char **) input, &inLeft, output, &outLeft);
|
||||
|
||||
*inputLeft = inLeft / 2;
|
||||
*outputLeft = outLeft;
|
||||
if (res != (size_t) -1) {
|
||||
*inputLeft = inLeft / 2;
|
||||
*outputLeft = outLeft;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -607,10 +607,10 @@ nsNativeCharsetConverter::UnicodeToNative(const PRUnichar **input,
|
||||
inLeft -= sizeof(PRUnichar);
|
||||
}
|
||||
|
||||
(*input) += (*inputLeft - inLeft / 2);
|
||||
*inputLeft = inLeft / 2;
|
||||
*outputLeft = outLeft;
|
||||
if (res != (size_t) -1) {
|
||||
(*input) += (*inputLeft - inLeft/2);
|
||||
*inputLeft = inLeft/2;
|
||||
*outputLeft = outLeft;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -621,6 +621,7 @@ nsNativeCharsetConverter::UnicodeToNative(const PRUnichar **input,
|
||||
#endif
|
||||
|
||||
// fallback: truncate and hope for the best
|
||||
// XXX This is lame and we have to do better.
|
||||
utf16_to_isolatin1(input, inputLeft, output, outputLeft);
|
||||
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user