Browse Source

* [SFXDescription] BugFix: Correct a data corruption issue in converting legacy channel values.

Robert MacGregor 3 years ago
parent
commit
4dea3810b9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Engine/source/sfx/sfxDescription.cpp

+ 2 - 1
Engine/source/sfx/sfxDescription.cpp

@@ -454,7 +454,8 @@ bool SFXDescription::onAdd()
    const char* channelValue = getDataField( sChannel, NULL );
    if( channelValue && channelValue[ 0 ] )
    {
-      const char* group = Con::evaluatef( "return sfxOldChannelToGroup( %s );", channelValue );
+      ConsoleValue result = Con::evaluatef( "return sfxOldChannelToGroup( %s );", channelValue );
+      const char* group = result.getString();
       if( !Sim::findObject( group, mSourceGroup ) )
          Con::errorf( "SFXDescription::onAdd - could not resolve channel '%s' to SFXSource", channelValue );
    }