Bladeren bron

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

Robert MacGregor 3 jaren geleden
bovenliggende
commit
4dea3810b9
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  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 );
    }