GRIM: Fix an error with patchr instead of detecting it later

This commit is contained in:
Joel Teichroeb 2012-04-09 17:11:25 -07:00
parent db117c376c
commit c9b33fc517
3 changed files with 14 additions and 7 deletions

View File

@ -0,0 +1,13 @@
PATCHR 1
# In the function si.set_up_actors (line 848), calls "start_script(si.naranja_drinking)",
# which doesn't exist.
# The problem with that is that lua_error ends the function that was going on,
# breaking si.set really badly.
begin 826b0f8e65bf5818ca64a29a37e65c0a 8CC4 #Both v1.0 and v1.01
#Just replace the bad call with NOP
replace 4959 FF FF FF FF FF FF FF FF
end

View File

@ -38,13 +38,7 @@ void start_script() {
lua_Type type = ttype(Address(paramObj));
if (paramObj == LUA_NOOBJECT || (type != LUA_T_CPROTO && type != LUA_T_PROTO)) {
warning("lua: Bad argument to start_script. - lua/ltask.cpp:32");
// NOTE: Decomment the lua_error if you want to see the stacktrace.
// It is commented out because si.lua, in the function si.set_up_actors (line 848),
// calls "start_script(si.naranja_drinking)", which doesn't exist. The problem with
// that is that lua_error ends the function that was going on, breaking
// si.set really badly.
// lua_error("Bad argument to start_script");
lua_error("Bad argument to start_script");
return;
}