Module: wine Branch: master Commit: b83c587f6e68c77d15a9b9335044a643172bc975 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b83c587f6e68c77d15a9b93350...
Author: Aric Stewart aric@codeweavers.com Date: Tue Dec 20 10:54:39 2011 -0600
user32: Do not simply return 0 in EDIT_EM_PosFromChar if line ssa is NULL.
---
dlls/user32/edit.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 6380d4b..4a54fa0 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -1069,13 +1069,15 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap) while (line_def->index != li) line_def = line_def->next;
- if (!line_def->ssa) - return 0; - lw = line_def->width; w = es->format_rect.right - es->format_rect.left; - ScriptStringCPtoX(line_def->ssa, (index - 1) - li, TRUE, &x); - x -= es->x_offset; + if (line_def->ssa) + { + ScriptStringCPtoX(line_def->ssa, (index - 1) - li, TRUE, &x); + x -= es->x_offset; + } + else + x = es->x_offset;
if (es->style & ES_RIGHT) x = w - (lw - x);