mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Fix issue with registered variables becoming corrupted when string value was accessed.
This commit is contained in:
parent
3a218217f4
commit
15169eab9f
3 changed files with 43 additions and 24 deletions
|
|
@ -186,19 +186,20 @@ public:
|
|||
fval = 0;
|
||||
sval = typeValueEmpty;
|
||||
bufferLen = 0;
|
||||
type = TypeInternalString;
|
||||
type = TypeInternalString;
|
||||
}
|
||||
|
||||
void cleanup()
|
||||
{
|
||||
if (type <= TypeInternalString &&
|
||||
sval != typeValueEmpty && type != TypeInternalStackString && type != TypeInternalStringStackPtr)
|
||||
if (bufferLen > 0)
|
||||
{
|
||||
dFree(sval);
|
||||
bufferLen = 0;
|
||||
}
|
||||
sval = typeValueEmpty;
|
||||
type = ConsoleValue::TypeInternalString;
|
||||
ival = 0;
|
||||
fval = 0;
|
||||
bufferLen = 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue