Commit 3ebb8784 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: Better handle cases in single line edit controls where es->x_offset exceeds line length.

parent fbbf3ba4
......@@ -1093,6 +1093,7 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
{
if (es->x_offset >= get_text_length(es))
{
int leftover = es->x_offset - get_text_length(es);
if (es->ssa)
{
const SIZE *size;
......@@ -1101,7 +1102,9 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
}
else
xoff = 0;
xoff += es->char_width * leftover;
}
else
ScriptStringCPtoX(es->ssa, es->x_offset, FALSE, &xoff);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment