mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Update simObject.cpp
better way to handle the validity check for const char*
This commit is contained in:
parent
728511b137
commit
173dbc8868
1 changed files with 2 additions and 1 deletions
|
|
@ -2834,7 +2834,8 @@ DefineEngineMethod( SimObject, getFieldValue, const char*, ( const char* fieldNa
|
|||
"@param index Optional parameter to specify the index of an array field separately.\n"
|
||||
"@return The value of the given field or \"\" if undefined." )
|
||||
{
|
||||
if (fieldName == "")
|
||||
const U32 nameLen = dStrlen( fieldName );
|
||||
if (nameLen == 0)
|
||||
return "";
|
||||
|
||||
char fieldNameBuffer[ 1024 ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue