Improvements to console refactor code

- Prevent stack corruption in a few places
- Use correct type in printfs
- Reduce type conversions in EngineApi & dAto*
- Fix compilation on GCC
- Tidy up code
This commit is contained in:
jamesu 2012-10-11 21:29:39 +01:00 committed by James Urquhart
parent e99eadd61f
commit 08d4f6ebc0
58 changed files with 733 additions and 690 deletions

View file

@ -1795,16 +1795,15 @@ static ConsoleDocFragment _ActionMapbindObj2(
ConsoleMethod( ActionMap, bindObj, bool, 6, 11, "(device, action, [modifier spec, mod...], command, object)"
"@hide")
{
SimObject* simObject = Sim::findObject(argv[argc - 1]);
if ( simObject == NULL )
{
Con::warnf("ActionMap::bindObj() - Cannot bind, specified object was not found!");
return false;
}
SimObject* simObject = Sim::findObject(argv[argc - 1]);
if ( simObject == NULL )
{
Con::warnf("ActionMap::bindObj() - Cannot bind, specified object was not found!");
return false;
}
StringStackWrapper args(argc - 3, argv + 2);
return object->processBind( args.count(), args, simObject );
StringStackWrapper args(argc - 3, argv + 2);
return object->processBind( args.count(), args, simObject );
}
//------------------------------------------------------------------------------

View file

@ -434,7 +434,7 @@ NetConnection::NetConnection()
// Disable starting a new journal recording or playback from here on
Journal::Disable();
// jamesu - netAddress is not set
// Ensure NetAddress is cleared
dMemset(&mNetAddress, '\0', sizeof(NetAddress));
}