summaryrefslogtreecommitdiffstats
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-09-13 19:36:09 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-09-13 19:52:09 +0200
commitc2961454fe006265454448ecce3f0a34834ec691 (patch)
tree6600657b428d2f9a3f1ae72bffec187f8d8a8a89 /src/yuzu_cmd
parentcmd/config: Remove uncaught usage of stoul (diff)
downloadyuzu-c2961454fe006265454448ecce3f0a34834ec691.tar
yuzu-c2961454fe006265454448ecce3f0a34834ec691.tar.gz
yuzu-c2961454fe006265454448ecce3f0a34834ec691.tar.bz2
yuzu-c2961454fe006265454448ecce3f0a34834ec691.tar.lz
yuzu-c2961454fe006265454448ecce3f0a34834ec691.tar.xz
yuzu-c2961454fe006265454448ecce3f0a34834ec691.tar.zst
yuzu-c2961454fe006265454448ecce3f0a34834ec691.zip
Diffstat (limited to 'src/yuzu_cmd')
-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