commit | 7c34bfab20443a2cc6a0f12e7f618bd1816dbb69 | [log] [tgz] |
---|---|---|
author | qingdoa daoo <qingdao33122@yahoo.com> | Fri Jun 02 09:02:42 2006 +0800 |
committer | Alexandre Julliard <julliard@winehq.org> | Fri Jun 02 11:45:43 2006 +0200 |
tree | 51ba509b9389decc618e8f6c8d1c68e19a51684a | |
parent | b8d9f3955a2104e629575b41f674ce625f771e60 [diff] [blame] |
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;