From df4e02b8bd01a6a72e7282fc9b3595dd27e8ee17 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 13 Aug 2010 08:17:55 +0200 Subject: argv[] is actually a char * array, who would have known... --- src/lua-interface.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lua-interface.cpp') 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 */ -- cgit v1.2.3