mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-23 18:02:46 -06:00
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'.
This commit is contained in:
parent
caa93cda48
commit
bce23c24e0
1 changed files with 1 additions and 1 deletions
|
@ -263,7 +263,7 @@ int main(int argc, char** argv) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'l': {
|
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")
|
str_arg.append(",0"); // FALLBACK: if string is partially completed ("1234,3")
|
||||||
// this will set all those unset to 0. otherwise we get
|
// this will set all those unset to 0. otherwise we get
|
||||||
// all 3s.
|
// all 3s.
|
||||||
|
|
Loading…
Reference in a new issue