Game Development Community

Bug in gameConnection.cpp.

by Claude-Alain Fournier · in Torque Game Engine Advanced · 02/21/2006 (12:17 pm) · 0 replies

Hi,

This bug was present in TGE and you corrected it in 2004. Now seems you made same bug in TSE. Check my original post for TGE SDK bugs :

www.garagegames.com/mg/forums/result.thread.php?qt=20685

Here is the excerpt of the bug :

In file gameConnection.cpp, method : GameConnection::readConnectRequest(....) (around line 295)

You execute the following code :

connectArgv[0] = "onConnectRequest";
   char buffer[256];
   Net::addressToString(getNetAddress(), buffer);
   connectArgv[2] = buffer;

   const char *ret = Con::execute(this, mConnectArgc + 2, connectArgv);


const char *ret = Con::execute(this, mConnectArgc + 2, connectArgv);


should be

const char *ret = Con::execute(this, mConnectArgc + [b]3[/b], connectArgv);


Because you take the number of argument passed in setConnectArgs(...) and add the method name, the Id of the object and the server address (+ 3 arguments).