summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-08-13 08:17:55 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2010-08-13 08:17:55 +0200
commitdf4e02b8bd01a6a72e7282fc9b3595dd27e8ee17 (patch)
treee15ccd8d913e3b2e2364ae3bbbe034c7e619c282
parentb8430b9ada1cfa2e330a3f25a761dcf751f64d06 (diff)
argv[] is actually a char * array, who would have known...
-rw-r--r--src/lua-interface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp
index 5cb47fe..8273a05 100644
--- a/src/lua-interface.cpp
+++ b/src/lua-interface.cpp
@@ -871,9 +871,10 @@ virtual int startup() throw (GeneralException) {
}
#ifndef _WIN32
- ssize_t slashpos = argv[0].strrchr('/');
+ String progname = argv[0];
+ ssize_t slashpos = progname.strrchr('/');
if (slashpos >= 0)
- searchpath = argv[0].extract(0, slashpos);
+ searchpath = progname.extract(0, slashpos);
#endif
/* Let's start parsing options */