Sanity check so calling getFieldValue on a blank fieldName doesn't cause a crash.

This commit is contained in:
Areloch 2019-02-23 16:50:05 -06:00
parent e0627973fb
commit 6f418cc183

View file

@ -2834,6 +2834,9 @@ 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 == "")
return "";
char fieldNameBuffer[ 1024 ];
char arrayIndexBuffer[ 64 ];