1.5 error
by Dean Parker · in iTorque 2D · 10/01/2012 (9:47 am) · 0 replies
The script ...game\main.cc, has the following error:

NOTE: The code was changed in 1.51 and the error does not appear.
Should you change the following code:
To:

NOTE: The code was changed in 1.51 and the error does not appear.
Should you change the following code:
/// Process a console event
void DemoGame::processConsoleEvent(ConsoleEvent *event)
{
char *argv[2];
sprintf(argv[0], "eval");
argv[1] = event->data;
Sim::postCurrentEvent(Sim::getRootGroup(), new SimConsoleEvent(2, const_cast<const char**>(argv), false));
}To:
/// Process a console event
void DemoGame::processConsoleEvent(ConsoleEvent *event)
{
char *argv[2] = {};
sprintf(argv[0], "eval");
argv[1] = event->data;
Sim::postCurrentEvent(Sim::getRootGroup(), new SimConsoleEvent(2, const_cast<const char**>(argv), false));
}About the author
I started programming in early 80's on an Atari 800 and now I am coding on VS 2008 C#.