From daa2e46b13da01c8e1f1c3bf104d34e1e4a3b10c Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Mon, 8 Apr 2019 06:28:15 +0000 Subject: [PATCH] SW: Fix -Wint-to-pointer-cast git-svn-id: https://svn.eduke32.com/eduke32@7531 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/sw/src/startwin.game.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/sw/src/startwin.game.cpp b/source/sw/src/startwin.game.cpp index 861346eb7..9eb9f177f 100644 --- a/source/sw/src/startwin.game.cpp +++ b/source/sw/src/startwin.game.cpp @@ -236,8 +236,12 @@ static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPA { int i; i = ListBox_GetCurSel((HWND)lParam); - if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i); - if (i != CB_ERR) strcpy(settings.selectedgrp, ((struct grpfile *)i)->name); + if (i != CB_ERR) + { + LRESULT j = ListBox_GetItemData((HWND)lParam, i); + if (j != CB_ERR) + strcpy(settings.selectedgrp, ((struct grpfile const *)j)->name); + } return TRUE; } default: break;