зеркало из https://github.com/mozilla/pjs.git
fixing a smashed memory block problem, wasn't allocating enough space for the '\0' terminator.
This commit is contained in:
Родитель
508fd3b70e
Коммит
db284bfd76
|
@ -854,7 +854,7 @@ MenuHandle nsMenu::NSStringNewMenu(short menuID, nsString& menuTitle)
|
|||
unicodeText = menuTitle.GetUnicode();
|
||||
unicodeTextLengthInBytes = menuTitle.Length() * sizeof(PRUnichar);
|
||||
scriptRunTextSizeInBytes = unicodeTextLengthInBytes * 2;
|
||||
scriptRunText = new char[scriptRunTextSizeInBytes];
|
||||
scriptRunText = new char[scriptRunTextSizeInBytes + 1]; // +1 for the null terminator.
|
||||
|
||||
err = ::ConvertFromUnicodeToScriptCodeRun(mUnicodeTextRunConverter,
|
||||
unicodeTextLengthInBytes,unicodeText,
|
||||
|
|
Загрузка…
Ссылка в новой задаче