Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #743 from RolandMunsil/fix-ar-code-warning
Fix "bad wxCheckListBox index" warning when trying to create AR Code
  • Loading branch information
lioncash committed Aug 6, 2014
2 parents 5e50d8f + b94069b commit 95f15ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Core/DolphinWX/ISOProperties.cpp
Expand Up @@ -1371,9 +1371,11 @@ void CISOProperties::ActionReplayList_Save()
std::vector<std::string> lines;
std::vector<std::string> enabledLines;
u32 index = 0;
u32 cheats_chkbox_count = Cheats->GetCount();
for (const ActionReplay::ARCode& code : arCodes)
{
if (Cheats->IsChecked(index))
// Check the index against the count because of the hacky way codes are added from the "Cheat Search" dialog
if ((index < cheats_chkbox_count) && Cheats->IsChecked(index))
enabledLines.push_back("$" + code.name);

// Do not save default cheats.
Expand Down

0 comments on commit 95f15ac

Please sign in to comment.