diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-09-16 11:40:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-16 11:40:03 -0400 |
| commit | c05ea35f78bd4de663bc022a7048e88d6ade594b (patch) | |
| tree | cee0c61ea4a84b2d876ac7c69d38542967bfb919 /src/yuzu_cmd | |
| parent | 7f705870d2255b8f45c3f38efe8906ed89073223 (diff) | |
| parent | 5d52d73c4b2781fd99260534c17e35640ab17589 (diff) | |
Merge pull request #11492 from lat9nq/c-numeric-conversions
general: Remove uncaught usages of C++ string number conversions
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
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); 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<u16>(std::stoi(match[4])); + if (!match[4].str().empty()) { + port = static_cast<u16>(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 |
