From 4d17c4d3cf83b6b977a420711a92979e38b56b41 Mon Sep 17 00:00:00 2001 From: kawi Date: Thu, 15 Jan 2015 15:44:30 +0100 Subject: [PATCH] crash if no argument --- os/ReDirTools.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]; -- 2.39.5