https://git.reactos.org/?p=reactos.git;a=commitdiff;h=40dab7d5e5823ef910f18…
commit 40dab7d5e5823ef910f1837f72dc37d916d811ef
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Wed Mar 20 02:42:09 2019 +0300
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Mar 23 15:52:43 2019 +0100
[USER32] Edit: Fix rectangle overflow when inserting characters
Based on patch by JIRA contributor 'I_Kill_Bugs'. CORE-11475
---
win32ss/user/user32/controls/edit.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/win32ss/user/user32/controls/edit.c b/win32ss/user/user32/controls/edit.c
index 70bdd1d40d..2f2da0f446 100644
--- a/win32ss/user/user32/controls/edit.c
+++ b/win32ss/user/user32/controls/edit.c
@@ -805,7 +805,11 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT
iend, INT delta
if ((es->style & ES_CENTER) || (es->style & ES_RIGHT))
rc.left = es->format_rect.left;
else
+#ifdef __REACTOS__ /* CORE-11475 */
+ rc.left = (short)LOWORD(EDIT_EM_PosFromChar(es, nstart_index, FALSE));
+#else
rc.left = LOWORD(EDIT_EM_PosFromChar(es, nstart_index, FALSE));
+#endif
rc.right = es->format_rect.right;
SetRectRgn(hrgn, rc.left, rc.top, rc.right, rc.bottom);