Fix specific usage of Con::executef where it was not being assigned to a ConsoleValue before getting it's data out of it.

This commit is contained in:
Jeff Hutchinson 2021-09-24 19:32:57 -04:00
parent 0f89373782
commit 755bbacaa0
13 changed files with 35 additions and 21 deletions

View file

@ -397,7 +397,8 @@ bool ModuleManager::loadModuleGroup( const char* pModuleGroup )
if ( pLoadReadyModuleDefinition->getModuleScriptFilePath() != StringTable->EmptyString() )
{
// Yes, so execute the script file.
const bool scriptFileExecuted = dAtob( Con::executef("exec", pLoadReadyModuleDefinition->getModuleScriptFilePath() ) );
ConsoleValue cValue = Con::executef("exec", pLoadReadyModuleDefinition->getModuleScriptFilePath());
const bool scriptFileExecuted = cValue.getBool();
// Did we execute the script file?
if ( scriptFileExecuted )
@ -784,7 +785,8 @@ bool ModuleManager::loadModuleExplicit( const char* pModuleId, const U32 version
if ( pLoadReadyModuleDefinition->getModuleScriptFilePath() != StringTable->EmptyString() )
{
// Yes, so execute the script file.
const bool scriptFileExecuted = dAtob( Con::executef("exec", pLoadReadyModuleDefinition->getModuleScriptFilePath() ) );
ConsoleValue cValue = Con::executef("exec", pLoadReadyModuleDefinition->getModuleScriptFilePath());
const bool scriptFileExecuted = cValue.getBool();
// Did we execute the script file?
if ( !scriptFileExecuted )