Merge pull request #594 from JeffProgrammer/executef-fixes

Fix specific usage of Con::executef where it was not being assigned t…
This commit is contained in:
Brian Roberts 2021-09-25 18:13:27 -05:00 committed by GitHub
commit 97ddb97410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 35 additions and 21 deletions

View file

@ -461,7 +461,9 @@ bool WorldEditor::pasteSelection( bool dropSel )
SimGroup *targetGroup = NULL;
if( isMethod( "getNewObjectGroup" ) )
{
const char* targetGroupName = Con::executef( this, "getNewObjectGroup" );
ConsoleValue cValue = Con::executef( this, "getNewObjectGroup" );
const char* targetGroupName = cValue.getString();
if( targetGroupName && targetGroupName[ 0 ] && !Sim::findObject( targetGroupName, targetGroup) )
Con::errorf( "WorldEditor::pasteSelection() - no SimGroup called '%s'", targetGroupName );
}