autoupdater: Fixed segfault on wrong long option

If an autoupdater long option (prefixed with '--') are unknown then a segmentation fault occurs.
Example:
root@node:~# autoupdater --xyz
Segmentation fault

[Matthias Schiffer: changed sentinel syntax]
This commit is contained in:
Jason 2019-12-30 15:27:24 +01:00 committed by Matthias Schiffer
parent 208d9ccd14
commit 85af243158
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 1 additions and 0 deletions

View File

@ -112,6 +112,7 @@ static void parse_args(int argc, char *argv[], struct settings *settings) {
{"no-action", no_argument, NULL, OPTION_NO_ACTION},
{"force-version", no_argument, NULL, OPTION_FORCE_VERSION},
{"help", no_argument, NULL, OPTION_HELP},
{}
};
while (true) {