From 4dea3810b99f2ff48b5f1204a0560a0567f6b530 Mon Sep 17 00:00:00 2001 From: Robert MacGregor Date: Wed, 24 Nov 2021 13:46:18 -0500 Subject: [PATCH] * [SFXDescription] BugFix: Correct a data corruption issue in converting legacy channel values. --- Engine/source/sfx/sfxDescription.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Engine/source/sfx/sfxDescription.cpp b/Engine/source/sfx/sfxDescription.cpp index 143e0a31e..8cd93b6b2 100644 --- a/Engine/source/sfx/sfxDescription.cpp +++ b/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 ); }