user32: Fix selection handling for listboxes with LBS_EXTENDEDSEL style.
diff --git a/dlls/user/listbox.c b/dlls/user/listbox.c
index cc87010..0b21a39 100644
--- a/dlls/user/listbox.c
+++ b/dlls/user/listbox.c
@@ -1387,7 +1387,7 @@
 
     if (!descr->nb_items) return LB_OKAY;
 
-    if (last >= descr->nb_items) last = descr->nb_items - 1;
+    if (last == -1 || last >= descr->nb_items) last = descr->nb_items - 1;
     if (first < 0) first = 0;
     if (last < first) return LB_OKAY;