From 5616ef2941f6c720240c8184bc702ab90e05972e Mon Sep 17 00:00:00 2001 From: RadsammyT Date: Sat, 23 Mar 2024 14:51:33 -0400 Subject: [PATCH] PR#3 review: fix -l arg breaking because optarg goes NULL when encountering an optional argument, so I have to do this instead to get the argument. See case 'p'. --- src/yuzu_cmd/yuzu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 5e70c7fcd5..dc19e56d02 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -265,7 +265,7 @@ int main(int argc, char** argv) { break; } case 'l': { - std::string str_arg(optarg); + std::string str_arg(argv[optind++]); str_arg.append(",0"); // FALLBACK: if string is partially completed ("1234,3") // this will set all those unset to 0. otherwise we get // all 3s.