Huw Davies : riched20: Flush the output buffer before a codepage change.

Alexandre Julliard julliard at winehq.org
Wed Dec 5 13:43:10 CST 2012


Module: wine
Branch: master
Commit: 368f9123c9e465e2f212e35ee5c920847c73b5af
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=368f9123c9e465e2f212e35ee5c920847c73b5af

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Dec  5 14:17:53 2012 +0000

riched20: Flush the output buffer before a codepage change.

---

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

diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c
index 9f88cf7..02d4636 100644
--- a/dlls/riched20/reader.c
+++ b/dlls/riched20/reader.c
@@ -2397,8 +2397,11 @@ CharAttr(RTF_Info *info)
                 font = RTFGetFont(info, info->rtfParam);
                 if (font)
                 {
-                        if (info->ansiCodePage != CP_UTF8)
+                        if (info->ansiCodePage != CP_UTF8 && info->codePage != font->rtfFCodePage)
+                        {
+                                RTFFlushOutputBuffer(info);
                                 info->codePage = font->rtfFCodePage;
+                        }
                         TRACE("font %d codepage %d\n", info->rtfParam, info->codePage);
                 }
                 else




More information about the wine-cvs mailing list