[PATCH] riched20: Pass count of character into ME_WordBreakProc() instead of count of byte.
Jactry Zeng
wine at jactry.com
Thu Aug 21 00:36:34 CDT 2014
For bug 28823: https://bugs.winehq.org/show_bug.cgi?id=28823
--
Regards,
Jactry Zeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20140821/3b4c5cc2/attachment.html>
-------------- next part --------------
From 6661fbf61ad757546f834d691b930aa7b8f955eb Mon Sep 17 00:00:00 2001
From: Jactry Zeng <wine at jactry.com>
Date: Wed, 20 Aug 2014 16:11:52 +0800
Subject: [PATCH] riched20: Pass count of character into ME_WordBreakProc()
instead of count of byte.
To: wine-patches <wine-patches at winehq.org>
Reply-To: wine-devel <wine-devel at winehq.org>
---
dlls/riched20/string.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/string.c b/dlls/riched20/string.c
index 12e4ad7..44726b3 100644
--- a/dlls/riched20/string.c
+++ b/dlls/riched20/string.c
@@ -125,8 +125,7 @@ ME_WordBreakProc(LPWSTR s, INT start, INT len, INT code)
/* FIXME: Native also knows about punctuation */
TRACE("s==%s, start==%d, len==%d, code==%d\n",
debugstr_wn(s, len), start, len, code);
- /* convert number of bytes to number of characters. */
- len /= sizeof(WCHAR);
+
switch (code)
{
case WB_ISDELIMITER:
@@ -154,7 +153,7 @@ int
ME_CallWordBreakProc(ME_TextEditor *editor, WCHAR *str, INT len, INT start, INT code)
{
if (!editor->pfnWordBreak) {
- return ME_WordBreakProc(str, start, len * sizeof(WCHAR), code);
+ return ME_WordBreakProc(str, start, len, code);
} else if (!editor->bEmulateVersion10) {
/* MSDN lied about the third parameter for EditWordBreakProc being the number
* of characters, it is actually the number of bytes of the string. */
--
2.0.2
More information about the wine-patches
mailing list