aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32/PlatWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r--win32/PlatWin.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 9035aa6f2..4e4a46bc8 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -3574,9 +3574,8 @@ LRESULT PASCAL ListBoxX::ControlWndProc(HWND hWnd, UINT iMessage, WPARAM wParam,
// We must take control of selection to prevent the ListBox activating
// the popup
const LRESULT lResult = ::SendMessage(hWnd, LB_ITEMFROMPOINT, 0, lParam);
- const int item = LOWORD(lResult);
- if (HIWORD(lResult) == 0 && item >= 0) {
- ListBox_SetCurSel(hWnd, item);
+ if (HIWORD(lResult) == 0) {
+ ListBox_SetCurSel(hWnd, LOWORD(lResult));
if (lbx) {
lbx->OnSelChange();
}