mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
riched20: Pass count of character into ME_WordBreakProc() instead of count of byte.
This commit is contained in:
parent
3a372f26e9
commit
063b3bc9db
1 changed files with 2 additions and 3 deletions
|
@ -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. */
|
||||
|
|
Loading…
Reference in a new issue