Commit dfd44bb9 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

riched20: Call GlobalReAlloc with GMEM_MOVEABLE flag.

parent da929946
...@@ -375,7 +375,7 @@ static DWORD CALLBACK ME_AppendToHGLOBAL(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG ...@@ -375,7 +375,7 @@ static DWORD CALLBACK ME_AppendToHGLOBAL(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG
if (pData->nLength+cb+1 >= cb) { if (pData->nLength+cb+1 >= cb) {
/* round up to 2^17 */ /* round up to 2^17 */
int nNewSize = (((nMaxSize+cb+1)|0x1FFFF)+1) & 0xFFFE0000; int nNewSize = (((nMaxSize+cb+1)|0x1FFFF)+1) & 0xFFFE0000;
pData->hData = GlobalReAlloc(pData->hData, nNewSize, 0); pData->hData = GlobalReAlloc(pData->hData, nNewSize, GMEM_MOVEABLE);
} }
pDest = GlobalLock(pData->hData); pDest = GlobalLock(pData->hData);
memcpy(pDest + pData->nLength, lpBuff, cb); memcpy(pDest + pData->nLength, lpBuff, cb);
...@@ -397,7 +397,7 @@ static HGLOBAL get_rtf_text(ME_TextEditor *editor, const ME_Cursor *start, int n ...@@ -397,7 +397,7 @@ static HGLOBAL get_rtf_text(ME_TextEditor *editor, const ME_Cursor *start, int n
es.dwCookie = (DWORD_PTR)&gds; es.dwCookie = (DWORD_PTR)&gds;
es.pfnCallback = ME_AppendToHGLOBAL; es.pfnCallback = ME_AppendToHGLOBAL;
ME_StreamOutRange(editor, SF_RTF, start, nChars, &es); ME_StreamOutRange(editor, SF_RTF, start, nChars, &es);
GlobalReAlloc(gds.hData, gds.nLength+1, 0); GlobalReAlloc(gds.hData, gds.nLength+1, GMEM_MOVEABLE);
return gds.hData; return gds.hData;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment