riched20: Accept RTF header without a version number

Phil Krylov phil at newstar.rinet.ru
Thu Aug 3 13:33:49 CDT 2006


Hi,

This patch fixes bug #5796.

-- Ph.
---

 dlls/riched20/editor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

5b171d0086a910c14dc8bb15e2859d1c627d5f68
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index 36be190..c0f856a 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -630,7 +630,7 @@ static LRESULT ME_StreamIn(ME_TextEditor
     ME_StreamInFill(&inStream);
     if (!inStream.editstream->dwError)
     {
-      if (strncmp(inStream.buffer, "{\\rtf1", 6) &&
strncmp(inStream.buffer, "{\\urtf", 6))
+      if (strncmp(inStream.buffer, "{\\rtf", 5) &&
strncmp(inStream.buffer, "{\\urtf", 6))
       {
         format &= ~SF_RTF;
         format |= SF_TEXT;
@@ -1867,7 +1867,7 @@ LRESULT WINAPI RichEditANSIWndProc(HWND
     if (lParam)
     {
       TRACE("WM_SETTEXT lParam==%lx\n",lParam);
-      if (!IsWindowUnicode(hWnd) && !strncmp((char *)lParam, "{\\rtf1", 6))
+      if (!IsWindowUnicode(hWnd) && !strncmp((char *)lParam, "{\\rtf", 5))
       {
         /* Undocumented: WM_SETTEXT supports RTF text */
         ME_StreamInRTFString(editor, 0, (char *)lParam);
-- 
1.2.4



More information about the wine-patches mailing list