fix #414 by idiot-proofing the lua console command window, if emu.frameadvance() is called, log a warning instead of blowing up
This commit is contained in:
parent
ddf23e4c3a
commit
889feeeeba
|
@ -1311,6 +1311,12 @@ namespace BizHawk.Client.EmuHawk
|
||||||
// TODO: Maybe make these try-catches more general
|
// TODO: Maybe make these try-catches more general
|
||||||
if (!string.IsNullOrWhiteSpace(InputBox.Text))
|
if (!string.IsNullOrWhiteSpace(InputBox.Text))
|
||||||
{
|
{
|
||||||
|
if (InputBox.Text.Contains("emu.frameadvance("))
|
||||||
|
{
|
||||||
|
ConsoleLog("emu.frameadvance() can not be called from the console");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LuaSandbox.Sandbox(null, () =>
|
LuaSandbox.Sandbox(null, () =>
|
||||||
{
|
{
|
||||||
LuaImp.ExecuteString(string.Format("console.log({0})", InputBox.Text));
|
LuaImp.ExecuteString(string.Format("console.log({0})", InputBox.Text));
|
||||||
|
|
Loading…
Reference in New Issue