Send runCommand output to correct output stream

e.g. when run with dfhack-run
develop
lethosor 2021-01-08 21:06:42 -05:00
parent 614ea739d0
commit 69ce5d9e3f
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 5 additions and 1 deletions

@ -2833,7 +2833,11 @@ static int internal_runCommand(lua_State *L)
bool use_console = lua_toboolean(L, 2); bool use_console = lua_toboolean(L, 2);
if (use_console) if (use_console)
{ {
out = &Core::getInstance().getConsole(); out = Lua::GetOutput(L);
if (!out)
{
out = &Core::getInstance().getConsole();
}
} }
else else
{ {