From: kawi Date: Thu, 15 Jan 2015 14:44:30 +0000 (+0100) Subject: crash if no argument X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=4d17c4d3cf83b6b977a420711a92979e38b56b41;p=crepublib crash if no argument --- diff --git a/os/ReDirTools.cpp b/os/ReDirTools.cpp index db2032e..4c0269c 100644 --- a/os/ReDirTools.cpp +++ b/os/ReDirTools.cpp @@ -1343,8 +1343,10 @@ void ReDirTools::statistic(int argc, const char* argv[]){ int ReDirTools::main(int argc, char* orgArgv[]){ ReDirTools tools; const char** argv = (const char**) orgArgv; - if (argc < 2) + if (argc < 2){ tools.help(0, argv); + exit(1); + } argc--; argv++; const char* arg0 = argv[0];