Commit 614b7d74 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

user32: Fix rounding issue in edit tests for char pos messages.

parent b112b4d4
......@@ -1150,7 +1150,7 @@ static void test_char_from_pos(void)
SendMessageA(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
lo = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 0, 0));
hi = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 1, 0));
mid = lo + (hi - lo) / 2;
mid = lo + (hi - lo + 1) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i));
......@@ -1168,7 +1168,7 @@ static void test_char_from_pos(void)
SendMessageA(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
lo = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 0, 0));
hi = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 1, 0));
mid = lo + (hi - lo) / 2;
mid = lo + (hi - lo + 1) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i));
......@@ -1186,7 +1186,7 @@ static void test_char_from_pos(void)
SendMessageA(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
lo = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 0, 0));
hi = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 1, 0));
mid = lo + (hi - lo) / 2;
mid = lo + (hi - lo + 1) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i));
......@@ -1204,7 +1204,7 @@ static void test_char_from_pos(void)
SendMessageA(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
lo = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 0, 0));
hi = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 1, 0));
mid = lo + (hi - lo) / 2 +1;
mid = lo + (hi - lo + 1) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i));
......@@ -1223,7 +1223,7 @@ static void test_char_from_pos(void)
SendMessageA(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
lo = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 0, 0));
hi = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 1, 0));
mid = lo + (hi - lo) / 2 +1;
mid = lo + (hi - lo + 1) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i));
......@@ -1242,7 +1242,7 @@ static void test_char_from_pos(void)
SendMessageA(hwEdit, WM_SETTEXT, 0, (LPARAM) "aa");
lo = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 0, 0));
hi = LOWORD(SendMessageA(hwEdit, EM_POSFROMCHAR, 1, 0));
mid = lo + (hi - lo) / 2 +1;
mid = lo + (hi - lo + 2) / 2;
for (i = lo; i < mid; i++) {
ret = LOWORD(SendMessageA(hwEdit, EM_CHARFROMPOS, 0, i));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment