Fix some failing tests.
This commit is contained in:
parent
aeb4e6e5d2
commit
d30f1fd738
|
@ -1457,7 +1457,7 @@ static INT EDIT_CharFromPos(EDITSTATE *es, INT x, INT y, LPBOOL after_wrap)
|
||||||
x_low = x_now;
|
x_low = x_now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (abs(x_high - x) <= abs(x_low - x) + 1)
|
if (abs(x_high - x) + 1 <= abs(x_low - x))
|
||||||
index = high;
|
index = high;
|
||||||
else
|
else
|
||||||
index = low;
|
index = low;
|
||||||
|
|
|
@ -865,7 +865,7 @@ static void test_edit_control_4(void)
|
||||||
SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
|
SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
|
||||||
lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0));
|
lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0));
|
||||||
hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0));
|
hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0));
|
||||||
mid = lo + (hi - lo) / 2;
|
mid = lo + (hi - lo) / 2 +1;
|
||||||
|
|
||||||
for (i = lo; i < mid; i++) {
|
for (i = lo; i < mid; i++) {
|
||||||
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
|
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
|
||||||
|
@ -883,7 +883,7 @@ static void test_edit_control_4(void)
|
||||||
SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
|
SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
|
||||||
lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0));
|
lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0));
|
||||||
hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0));
|
hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0));
|
||||||
mid = lo + (hi - lo) / 2;
|
mid = lo + (hi - lo) / 2 +1;
|
||||||
|
|
||||||
for (i = lo; i < mid; i++) {
|
for (i = lo; i < mid; i++) {
|
||||||
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
|
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
|
||||||
|
@ -901,7 +901,7 @@ static void test_edit_control_4(void)
|
||||||
SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
|
SendMessage(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
|
||||||
lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0));
|
lo = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 0, 0));
|
||||||
hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0));
|
hi = LOWORD(SendMessage(hwEdit, EM_POSFROMCHAR, 1, 0));
|
||||||
mid = lo + (hi - lo) / 2;
|
mid = lo + (hi - lo) / 2 +1;
|
||||||
|
|
||||||
for (i = lo; i < mid; i++) {
|
for (i = lo; i < mid; i++) {
|
||||||
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
|
ret = LOWORD(SendMessage(hwEdit, EM_CHARFROMPOS, 0, (LPARAM) i));
|
||||||
|
|
Loading…
Reference in New Issue