diff --git a/src/citra_qt/applets/mii_selector.cpp b/src/citra_qt/applets/mii_selector.cpp index 9bcc65246..c80686fd6 100644 --- a/src/citra_qt/applets/mii_selector.cpp +++ b/src/citra_qt/applets/mii_selector.cpp @@ -52,11 +52,11 @@ QtMiiSelectorDialog::QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_sel auto file{std::move(file_result).Unwrap()}; - u32 id; + u32 id = 0; u32 offset{0x8}; MiiData mii; - for (int i{}; i < 100; ++i) { + for (int i = 0; i < 100; ++i) { file->Read(offset, mii.size(), mii.data()); std::memcpy(&id, mii.data(), sizeof(u32)); if (id != 0) { @@ -73,7 +73,7 @@ QtMiiSelectorDialog::QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_sel return; } - if (combobox->count() >= static_cast(config.initially_selected_mii_index)) { + if (combobox->count() > static_cast(config.initially_selected_mii_index)) { combobox->setCurrentIndex(static_cast(config.initially_selected_mii_index)); } diff --git a/src/citra_qt/applets/mii_selector.h b/src/citra_qt/applets/mii_selector.h index 2180ff18b..3864f8aab 100644 --- a/src/citra_qt/applets/mii_selector.h +++ b/src/citra_qt/applets/mii_selector.h @@ -17,7 +17,7 @@ class QtMiiSelectorDialog final : public QDialog { Q_OBJECT public: - QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_selector_); + QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_selector); private: void ShowNoMiis();