Module: wine
Branch: master
Commit: 4aef5cb86dcb1e2692a233883f3fe102a5477334
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4aef5cb86dcb1e2692a233883…
Author: Lei Zhang <thestig(a)google.com>
Date: Mon Apr 14 16:53:42 2008 -0700
user32: Do checks in the right order in EDIT_BuildLineDefs_ML.
---
dlls/user32/edit.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index b2bfe1c..c969ea2 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -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 */