Module: wine Branch: master Commit: 64adeb0285805304f36c4a81eb908acb4fc88932 URL: http://source.winehq.org/git/wine.git/?a=commit;h=64adeb0285805304f36c4a81eb...
Author: Aric Stewart aric@codeweavers.com Date: Tue Nov 1 10:09:37 2011 -0500
user32: Early versions of usp10 are not well behaved with ScriptString_pSize when SCRIPT_STRING_ANALYSIS is NULL.
---
dlls/user32/edit.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 23033b8..a0bc962 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -783,12 +783,13 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta */ static void EDIT_CalcLineWidth_SL(EDITSTATE *es) { - const SIZE *size; - EDIT_UpdateUniscribeData(es, NULL, 0); - size = ScriptString_pSize(es->ssa); - if (size) + if (es->ssa) + { + const SIZE *size; + size = ScriptString_pSize(es->ssa); es->text_width = size->cx; + } else es->text_width = 0; } @@ -884,8 +885,9 @@ static INT EDIT_CharFromPos(EDITSTATE *es, INT x, INT y, LPBOOL after_wrap) { if (x) { - const SIZE *size; - size = ScriptString_pSize(es->ssa); + const SIZE *size = NULL; + if (es->ssa) + size = ScriptString_pSize(es->ssa); if (!size) index = 0; else if (x > size->cx)