From bce23c24e03e1a2212c6acff68b55f338eb1c923 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/suyu_cmd/suyu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/suyu_cmd/suyu.cpp b/src/suyu_cmd/suyu.cpp index c0757d0821..1a5714950d 100644 --- a/src/suyu_cmd/suyu.cpp +++ b/src/suyu_cmd/suyu.cpp @@ -263,7 +263,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.