diff --git a/out/boot.dol b/out/boot.dol index f59b5913..36e155ab 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index 279e4415..5a323e47 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -2450,7 +2450,7 @@ bool CMenu::_loadChannelList(void) bool CMenu::_loadPluginList() { bool updateCache = m_cfg.getBool(PLUGIN_DOMAIN, "update_cache"); - int channels_type = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL); + int channels_type = min(max(1, m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL)), (int)ARRAY_SIZE(CMenu::_ChannelsType)); gprintf("Adding plugins list\n"); for(u8 i = 0; m_plugin.PluginExist(i); ++i) { diff --git a/source/menu/menu_config3.cpp b/source/menu/menu_config3.cpp index 9b8e2683..171b80d3 100644 --- a/source/menu/menu_config3.cpp +++ b/source/menu/menu_config3.cpp @@ -65,7 +65,7 @@ void CMenu::_showConfig3(void) i = min(max(0, m_cfg.getInt("GENERAL", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_languages) - 1); m_btnMgr.setText(m_config3LblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text)); - i = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL) - 1; + i = min(max(1, m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL)), (int)ARRAY_SIZE(CMenu::_ChannelsType)) - 1; m_btnMgr.setText(m_config3LblChannelsTypeVal, _t(CMenu::_ChannelsType[i].id, CMenu::_ChannelsType[i].text)); }