Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
09802e2c
Commit
09802e2c
authored
Oct 28, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Handle negative position given to EM_POSFROMCHAR.
parent
795c4a77
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
editor.c
dlls/riched20/editor.c
+1
-0
editor.c
dlls/riched20/tests/editor.c
+4
-0
No files found.
dlls/riched20/editor.c
View file @
09802e2c
...
...
@@ -3544,6 +3544,7 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
nCharOfs
=
lParam
;
nLength
=
ME_GetTextLength
(
editor
);
nCharOfs
=
min
(
nCharOfs
,
nLength
);
nCharOfs
=
max
(
nCharOfs
,
0
);
ME_RunOfsFromCharOfs
(
editor
,
nCharOfs
,
&
pRun
,
&
nOffset
);
assert
(
pRun
->
type
==
diRun
);
...
...
dlls/riched20/tests/editor.c
View file @
09802e2c
...
...
@@ -649,6 +649,10 @@ static void test_EM_POSFROMCHAR(void)
SendMessage
(
hwndRichEdit
,
WM_GETTEXTLENGTH
,
0
,
0
)
+
1
);
ok
(
pt
.
x
==
xpos
,
"pt.x = %d
\n
"
,
pt
.
x
);
/* Try a negative position. */
SendMessage
(
hwndRichEdit
,
EM_POSFROMCHAR
,
(
WPARAM
)
&
pt
,
-
1
);
ok
(
pt
.
x
==
1
,
"pt.x = %d
\n
"
,
pt
.
x
);
DestroyWindow
(
hwndRichEdit
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment