From 5ffa1049ae639215f4885684a39607875cb9497b Mon Sep 17 00:00:00 2001 From: lat9nq Date: Wed, 13 Sep 2023 13:35:36 -0400 Subject: cmd/config: Remove uncaught usage of stoul --- src/yuzu_cmd/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index c42d98709..0d25ff400 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -259,7 +259,7 @@ void Config::ReadValues() { std::stringstream ss(title_list); std::string line; while (std::getline(ss, line, '|')) { - const auto title_id = std::stoul(line, nullptr, 16); + const auto title_id = std::strtoul(line.c_str(), nullptr, 16); const auto disabled_list = sdl2_config->Get("AddOns", "disabled_" + line, ""); std::stringstream inner_ss(disabled_list); -- cgit v1.2.3 From c2961454fe006265454448ecce3f0a34834ec691 Mon Sep 17 00:00:00 2001 From: lat9nq Date: Wed, 13 Sep 2023 13:36:09 -0400 Subject: cmd/yuzu: Remove uncaught usage of stoi Also fixes a style inconsistency --- src/yuzu_cmd/yuzu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/yuzu_cmd') diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 55d0938f7..087cfaa26 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -264,8 +264,9 @@ int main(int argc, char** argv) { nickname = match[1]; password = match[2]; address = match[3]; - if (!match[4].str().empty()) - port = static_cast(std::stoi(match[4])); + if (!match[4].str().empty()) { + port = static_cast(std::strtoul(match[4].str().c_str(), nullptr, 0)); + } std::regex nickname_re("^[a-zA-Z0-9._\\- ]+$"); if (!std::regex_match(nickname, nickname_re)) { std::cout -- cgit v1.2.3