зеркало из https://github.com/mozilla/gecko-dev.git
r=pedemont, sr=blizzard (platform specific code), a=mkaply OS/2 only - need to allocate more space for our unicode to native conversions
This commit is contained in:
Родитель
04ee32dc17
Коммит
46f60f8e69
|
@ -1013,7 +1013,9 @@ NS_CopyUnicodeToNative(const nsAString &input, nsACString &output)
|
|||
|
||||
const nsPromiseFlatString &flat = PromiseFlatString(input);
|
||||
UniChar *inputStr = (UniChar*) NS_CONST_CAST(PRUnichar*, flat.get());
|
||||
size_t inputLen = flat.Length() + 1; // include null char
|
||||
// maximum length of unicode string of length x converted to native
|
||||
// codepage is x*2
|
||||
size_t inputLen = (flat.Length()*2) + 1; // include null char
|
||||
|
||||
// resultLen must be >= inputLen or the unicode conversion will fail
|
||||
size_t resultLen = inputLen;
|
||||
|
|
Загрузка…
Ссылка в новой задаче