Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/riched20/clipboard.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c index 578fb02fd99..f74ca2dae1a 100644 --- a/dlls/riched20/clipboard.c +++ b/dlls/riched20/clipboard.c @@ -344,13 +344,12 @@ static HGLOBAL get_unicode_text(ME_TextEditor *editor, const ME_Cursor *start, i int pars = 0; WCHAR *data; HANDLE ret; - ME_DisplayItem *para; + ME_Paragraph *para; int nEnd = ME_GetCursorOfs(start) + nChars;
/* count paragraphs in range */ - para = start->pPara; - while((para = para->member.para.next_para) && - para->member.para.nCharOfs <= nEnd) + para = &start->pPara->member.para; + while ((para = para_next( para )) && para->nCharOfs <= nEnd) pars++;
ret = GlobalAlloc(GMEM_MOVEABLE, sizeof(WCHAR) * (nChars + pars + 1));