PR#3 review: fix -l arg breaking
suyu-ci / reuse (pull_request) Failing after 11s Details
codespell / Check for spelling errors (pull_request) Successful in 11s Details
suyu verify / Verify Format (pull_request) Failing after 1m31s Details
suyu verify / test build (linux-fresh, clang) (pull_request) Has been skipped Details
suyu verify / test build (linux-fresh, linux) (pull_request) Has been skipped Details
suyu verify / test build (linux-mingw, windows) (pull_request) Has been skipped Details
suyu verify / android (pull_request) Has been skipped Details

because optarg goes NULL when encountering an optional argument, so I have to do this instead to get the argument. See case 'p'.
This commit is contained in:
RadsammyT 2024-03-23 14:51:33 -04:00
parent caa93cda48
commit bce23c24e0
Signed by: RadsammyT
GPG Key ID: AB722CF6F96430AE
1 changed files with 1 additions and 1 deletions

View File

@ -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.