RICHED20: 1.0 emulation off-by-ones - split - part 2/3: EM_LINELENGTH

Krzysztof Foltman wdev at foltman.com
Sat Oct 8 11:45:46 CDT 2005


ChangeLog:
   * Fix a bug in 1.0 emulation mode in EM_LINELENGTH (which broke PTE 
installer)

Krzysztof

-------------- next part --------------
Index: editor.c
===================================================================
RCS file: /home/wine/wine/dlls/riched20/editor.c,v
retrieving revision 1.59
diff -u -r1.59 editor.c
@@ -1666,7 +1669,8 @@
     if (item_end)
       nNextLineOfs = ME_CharOfsFromRunOfs(editor, ME_FindItemFwd(item_end, diRun), 0);
     else
-      nNextLineOfs = ME_FindItemFwd(item, diParagraphOrEnd)->member.para.nCharOfs-1;
+      nNextLineOfs = ME_FindItemFwd(item, diParagraphOrEnd)->member.para.nCharOfs
+       - (editor->bEmulateVersion10?2:1);
     nChars = nNextLineOfs - nThisLineOfs;
     TRACE("EM_LINELENGTH(%d)==%d\n",wParam, nChars);
     return nChars;


More information about the wine-patches mailing list