From 77f837801392837aa4bc4168a362e5a7b68613fa Mon Sep 17 00:00:00 2001 From: Ali El Gariani Date: Fri, 4 Jul 2008 00:35:13 +0000 Subject: [PATCH] Fix random downloaded add-on (and possibly other upload action)... ...when using filter in the add-on management dialog. Bug reported by Turin. --- src/game.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game.cpp b/src/game.cpp index 8387c08a122..6a2f1872723 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1437,7 +1437,9 @@ void game_controller::download_addons(std::string host) _("Filter: "), options, options_to_filter, 0, addon_dialog, 300); addon_dialog.set_textbox(filter); - const int index = addon_dialog.show(); + int index = addon_dialog.show(); + index = filter->get_index(index); + if(index < 0) { return; }