user32: Do checks in the right order in EDIT_BuildLineDefs_ML.
authorLei Zhang <thestig@google.com>
Mon, 14 Apr 2008 23:53:42 +0000 (16:53 -0700)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 15 Apr 2008 12:34:18 +0000 (14:34 +0200)
dlls/user32/edit.c

index b2bfe1cc33afa98d1f813b310bc05affeb52b7f8..c969ea230a699a7508ff11e6f5941ec4bec9c979 100644 (file)
@@ -1277,9 +1277,9 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
                        current_line->width = (INT)LOWORD(GetTabbedTextExtentW(dc, current_position,
                                        current_line->net_length, es->tabs_count, es->tabs));
                    }
-                   else if (orig_net_length <  current_line->net_length  &&
-                       current_line == start_line &&
-                       current_line->index != nstart_index) {
+                   else if (current_line == start_line &&
+                             current_line->index != nstart_index &&
+                             orig_net_length < current_line->net_length) {
                        /* The previous line expanded but it's still not as wide as the client rect */
                        /* The expansion is due to an upwards line wrap so we must partially include
                           it in the update region */