From e689847b11b927cfd4746ec21571e4d61c1953a3 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Sun, 14 Jul 2019 13:26:23 -0400 Subject: [PATCH] citra_qt/configure_system: fix string comparison (#4830) country_names has type std::array. Pointer comparison to test empty string is wrong --- src/citra_qt/configuration/configure_system.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/citra_qt/configuration/configure_system.cpp b/src/citra_qt/configuration/configure_system.cpp index 743305216..343799072 100644 --- a/src/citra_qt/configuration/configure_system.cpp +++ b/src/citra_qt/configuration/configure_system.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include #include "citra_qt/configuration/configure_system.h" #include "citra_qt/ui_settings.h" @@ -227,7 +228,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui:: connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, &ConfigureSystem::RefreshConsoleID); for (u8 i = 0; i < country_names.size(); i++) { - if (country_names.at(i) != "") { + if (std::strcmp(country_names.at(i), "") != 0) { ui->combo_country->addItem(tr(country_names.at(i)), i); } }