Make sure that we are not out of array.

Command line arguments are not available on android.
This commit is contained in:
Deve 2016-11-11 14:07:18 +01:00
parent 452c7c1e40
commit 6b2bf1c088

View File

@ -31,7 +31,9 @@ std::string CommandLine::m_exec_name="";
*/
void CommandLine::init(unsigned int argc, char *argv[])
{
m_exec_name = argv[0];
if (argc > 0)
m_exec_name = argv[0];
for(unsigned int i=1; i<argc; i++)
m_argv.push_back(argv[i]);
} // CommandLine