comctl32/listview: Remove redundant check in LVM_DELETECOLUMN handler.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-08-01 12:18:51 +03:00 committed by Alexandre Julliard
parent 5faab43d34
commit e0361765ab
2 changed files with 8 additions and 2 deletions

View File

@ -5621,8 +5621,8 @@ static BOOL LISTVIEW_DeleteColumn(LISTVIEW_INFO *infoPtr, INT nColumn)
TRACE("nColumn=%d\n", nColumn); TRACE("nColumn=%d\n", nColumn);
if (nColumn < 0 || DPA_GetPtrCount(infoPtr->hdpaColumns) == 0 if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns))
|| nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE; return FALSE;
/* While the MSDN specifically says that column zero should not be deleted, /* While the MSDN specifically says that column zero should not be deleted,
what actually happens is that the column itself is deleted but no items or subitems what actually happens is that the column itself is deleted but no items or subitems

View File

@ -1420,6 +1420,12 @@ static void test_columns(void)
10, 10, 100, 200, hwndparent, NULL, NULL, NULL); 10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
ok(hwnd != NULL, "failed to create listview window\n"); ok(hwnd != NULL, "failed to create listview window\n");
rc = SendMessageA(hwnd, LVM_DELETECOLUMN, -1, 0);
ok(!rc, "got %d\n", rc);
rc = SendMessageA(hwnd, LVM_DELETECOLUMN, 0, 0);
ok(!rc, "got %d\n", rc);
/* Add a column with no mask */ /* Add a column with no mask */
memset(&column, 0xcc, sizeof(column)); memset(&column, 0xcc, sizeof(column));
column.mask = 0; column.mask = 0;