Editor Bug Fix Selecting self in 3rd person
by William Kosche · in Torque Game Engine · 10/23/2004 (12:11 pm) · 1 replies
In running some debug marathons i found a bug that crashes the engine.
The bug occurs when pulling down the editor in 3rd person and then selecting a box via dragging on your "self". In my case it was a car.
The error was caused from these few lines in GuiInspector.cc
In void GuiInspector::inspect(SimObject * obj)
at roughly line 279
Heres the fix
if dstr was left as "" the expandEscape function continues past its buffer limit , thus crashing the game.
The bug occurs when pulling down the editor in 3rd person and then selecting a box via dragging on your "self". In my case it was a car.
The error was caused from these few lines in GuiInspector.cc
In void GuiInspector::inspect(SimObject * obj)
at roughly line 279
if (groupExpand)
{
// Yes, so add controls.
for(U32 i = 0; i < itr->elementCount; i++)
{
const char * dstr = Con::getData(itr->type, (void *)(((const char *)obj) + itr->offset), i, itr->table, itr->flag);
if(!dstr)
dstr = "";<--- offending bug maker -- line 279
expandEscape(textbuf, dstr);Heres the fix
const char * dstr = Con::getData(itr->type, (void *)(((const char *)obj) + itr->offset), i, itr->table, itr->flag);
if(!dstr)
dstr = "[[60c23271a8811]]";
expandEscape(textbuf, dstr);if dstr was left as "" the expandEscape function continues past its buffer limit , thus crashing the game.
Torque Owner Nathan Martin
TRON 2001 Network