diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index b85d075961f..5de02f4f1fc 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6922,7 +6922,7 @@ static BOOL LISTVIEW_Update(LISTVIEW_INFO *infoPtr, INT nItem) { TRACE("(nItem=%d)\n", nItem); - if (nItem < 0 && nItem >= infoPtr->nItemCount) return FALSE; + if (nItem < 0 || nItem >= infoPtr->nItemCount) return FALSE; /* rearrange with default alignment style */ if (is_autoarrange(infoPtr))