mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 11:22:38 -04:00
Do not loop infinitely if there is no argument passed to kiwix-serve.
If there is no argument, optind==argc==1. We must not try to look into argv[1] but we need to break the loop anyway.
This commit is contained in:
parent
cd623ce358
commit
8a9673191e
@ -517,7 +517,7 @@ int main(int argc, char **argv) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (optind < argc) {
|
||||
if (optind <= argc) {
|
||||
if (libraryFlag)
|
||||
{
|
||||
libraryPath = argv[optind++];
|
||||
|
Loading…
x
Reference in New Issue
Block a user