Aric Stewart : user32: More instances where early versions of usp10 are not well behaved with ScriptString_pSize being NULL .

Alexandre Julliard julliard at winehq.org
Wed Nov 28 14:14:04 CST 2012


Module: wine
Branch: master
Commit: bd7e8df6ba2d7984043ad9aaf50e966d05395ff2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bd7e8df6ba2d7984043ad9aaf50e966d05395ff2

Author: Aric Stewart <aric at codeweavers.com>
Date:   Tue Nov 27 14:31:46 2012 -0600

user32: More instances where early versions of usp10 are not well behaved with ScriptString_pSize being NULL.

Issue discovered by Qian Hong.

---

 dlls/user32/edit.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index f5d4e65..c143aa6 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -640,7 +640,9 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
 				current_line->net_length = prev;
 				EDIT_InvalidateUniscribeData_linedef(current_line);
 				EDIT_UpdateUniscribeData_linedef(es, NULL, current_line);
-				sz = ScriptString_pSize(current_line->ssa);
+				if (current_line->ssa)
+					sz = ScriptString_pSize(current_line->ssa);
+				else sz = 0;
 				if (sz)
 					current_line->width = sz->cx;
 				else
@@ -697,8 +699,13 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
 			if (current_line->net_length > 0)
 			{
 				EDIT_UpdateUniscribeData_linedef(es, NULL, current_line);
-				sz = ScriptString_pSize(current_line->ssa);
-				current_line->width = sz->cx;
+				if (current_line->ssa)
+				{
+					sz = ScriptString_pSize(current_line->ssa);
+					current_line->width = sz->cx;
+				}
+				else
+					current_line->width = 0;
 			}
 			else current_line->width = 0;
 		    }




More information about the wine-cvs mailing list