mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Merge pull request #1261 from Areloch/setFieldValueSanityCheck
Adds a sanity check to SimObject's setFieldValue console method
This commit is contained in:
commit
397066caaf
1 changed files with 7 additions and 0 deletions
|
|
@ -3072,6 +3072,13 @@ DefineEngineMethod( SimObject, setFieldValue, bool, ( const char* fieldName, con
|
||||||
{
|
{
|
||||||
char fieldNameBuffer[ 1024 ];
|
char fieldNameBuffer[ 1024 ];
|
||||||
char arrayIndexBuffer[ 64 ];
|
char arrayIndexBuffer[ 64 ];
|
||||||
|
|
||||||
|
if( !fieldName || !fieldName[0] )
|
||||||
|
{
|
||||||
|
AssertFatal(false, "SimObject::setFieldValue - Invalid field name.");
|
||||||
|
Con::errorf( "SimObject::setFieldValue - Invalid field name." );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Parse out index if the field is given in the form of 'name[index]'.
|
// Parse out index if the field is given in the form of 'name[index]'.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue