summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-09-16 17:40:03 +0200
committerGitHub <noreply@github.com>2023-09-16 17:40:03 +0200
commitc05ea35f78bd4de663bc022a7048e88d6ade594b (patch)
treecee0c61ea4a84b2d876ac7c69d38542967bfb919 /src/yuzu_cmd/yuzu.cpp
parentMerge pull request #11483 from FearlessTobi/save-size-max (diff)
parentshared_widget: Use default literals more (diff)
downloadyuzu-c05ea35f78bd4de663bc022a7048e88d6ade594b.tar
yuzu-c05ea35f78bd4de663bc022a7048e88d6ade594b.tar.gz
yuzu-c05ea35f78bd4de663bc022a7048e88d6ade594b.tar.bz2
yuzu-c05ea35f78bd4de663bc022a7048e88d6ade594b.tar.lz
yuzu-c05ea35f78bd4de663bc022a7048e88d6ade594b.tar.xz
yuzu-c05ea35f78bd4de663bc022a7048e88d6ade594b.tar.zst
yuzu-c05ea35f78bd4de663bc022a7048e88d6ade594b.zip
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp5
1 files changed, 3 insertions, 2 deletions
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