зеркало из https://github.com/mozilla/gecko-dev.git
Fixed native CF_TEXT copy, to decrement the size by one when it is a null
terminated string. Apps like MS-Word pass back the size including the terminating zero. This fixes that.
This commit is contained in:
Родитель
083aeb67d3
Коммит
e863238bf0
|
@ -371,6 +371,12 @@ nsresult nsClipboard::GetNativeDataOffClipboard(IDataObject * aDataObject, UINT
|
|||
switch (stm->tymed) {
|
||||
case TYMED_HGLOBAL:
|
||||
result = GetGlobalData(stm->hGlobal, aData, aLen);
|
||||
if (fe.cfFormat == CF_TEXT) {
|
||||
char * str = (char *)*aData;
|
||||
if (str[*aLen-1] == 0) {
|
||||
(*aLen)--;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче