diff options
| author | eriedaberrie <64395218+eriedaberrie@users.noreply.github.com> | 2023-06-09 03:15:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-09 12:15:18 +0200 |
| commit | d123835ef538b3bbe3bd15f81513aa7f48871c3b (patch) | |
| tree | 43a606f40c0844d18449c5fc1629f6f19fbbc1f5 /src/main.cpp | |
| parent | 7f753cab9a8044651753524da1725d4fbe2555a7 (diff) | |
main: fix segfault when -c is given with no other arguments (#2470)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9c52e66f..8f25574b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -51,7 +51,7 @@ int main(int argc, char** argv) { ignoreSudo = true; } else if (it->compare("-c") == 0 || it->compare("--config") == 0) { - if (std::next(it)->c_str() == nullptr) { + if (std::next(it) == args.end()) { help(); return 1; } |
