3
0
Fork 0

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.
small_fixes
Matthieu Gautier 9 years ago
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…
Cancel
Save