From 4ed33de69d12c0437103068b56ca9309a8dd05d3 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 18 Aug 2015 07:09:04 +0000 Subject: [PATCH] Amend r5330. git-svn-id: https://svn.eduke32.com/eduke32@5334 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/startwin.game.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c index 3af09045b..81eead20a 100644 --- a/polymer/eduke32/source/startwin.game.c +++ b/polymer/eduke32/source/startwin.game.c @@ -122,20 +122,21 @@ static void PopulateForm(int32_t pgs) j = ComboBox_AddString(hwnd, "None"); (void)ComboBox_SetItemData(hwnd, j, 0); (void)ComboBox_SetCurSel(hwnd, j); - for (dirs=finddirs,i=1; dirs != NULL; dirs=dirs->next) + for (dirs=finddirs,i=1,j=1; dirs != NULL; dirs=dirs->next) { if (Bstrcasecmp(dirs->name, "autoload") == 0) { - i++; + j++; continue; } (void)ComboBox_AddString(hwnd, dirs->name); - (void)ComboBox_SetItemData(hwnd, i, i); + (void)ComboBox_SetItemData(hwnd, i, j); if (Bstrcasecmp(dirs->name,settings.gamedir) == 0) (void)ComboBox_SetCurSel(hwnd, i); i++; + j++; } }