Make sure that we are not out of array.
Command line arguments are not available on android.
This commit is contained in:
parent
452c7c1e40
commit
6b2bf1c088
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user