summaryrefslogtreecommitdiff
path: root/quackleio/froggetopt.cpp
diff options
context:
space:
mode:
authorGökçen Eraslan <gokcen.eraslan@gmail.com>2016-01-12 22:33:19 +0100
committerGökçen Eraslan <gokcen.eraslan@gmail.com>2016-01-12 22:33:19 +0100
commitb51e0cc94aafa21ed74bb8e530b969dac73018d5 (patch)
treee0e72a13f70a818ec277f3784edee4b117cb8c2a /quackleio/froggetopt.cpp
parent0c4f091e74a5c6d1e0b5f4cf47670bd1c3e1e3e6 (diff)
Fix startup crash bug.
Diffstat (limited to 'quackleio/froggetopt.cpp')
-rw-r--r--quackleio/froggetopt.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/quackleio/froggetopt.cpp b/quackleio/froggetopt.cpp
index 24d9d2c..9131ecc 100644
--- a/quackleio/froggetopt.cpp
+++ b/quackleio/froggetopt.cpp
@@ -180,6 +180,12 @@ GetOpt::GetOpt( int argc, char *argv[] )
void GetOpt::init( const QStringList &argv, int offset )
{
+ numReqArgs = numOptArgs = 0;
+ currArg = 1; // appname is not part of the arguments
+
+ // application name
+ aname = QFileInfo( argv[0] ).fileName();
+
for ( int i = offset; i < argv.size(); ++i )
args.append( argv[i] );
}