The Lua Wizard was broken in 2.0.11

This commit is contained in:
bsongis
2014-09-10 15:35:53 +02:00
parent e22c658ee9
commit f584766fc7
2 changed files with 14 additions and 16 deletions
+11 -10
View File
@@ -1748,16 +1748,17 @@ void luaError(uint8_t error)
void luaExec(const char *filename)
{
luaInit();
standaloneScript.state = SCRIPT_NOFILE;
int result = luaLoad(filename, standaloneScript);
// TODO the same with run ...
if (result == SCRIPT_OK) {
luaState = INTERPRETER_RUNNING_STANDALONE_SCRIPT;
}
else {
luaError(result);
luaState = INTERPRETER_RELOAD_PERMANENT_SCRIPTS;
if (L) {
standaloneScript.state = SCRIPT_NOFILE;
int result = luaLoad(filename, standaloneScript);
// TODO the same with run ...
if (result == SCRIPT_OK) {
luaState = INTERPRETER_RUNNING_STANDALONE_SCRIPT;
}
else {
luaError(result);
luaState = INTERPRETER_RELOAD_PERMANENT_SCRIPTS;
}
}
}