Index: exec.c ================================================================== --- exec.c +++ exec.c @@ -9,10 +9,11 @@ #include #include #include "sqlite3.h" #include "smallxrm.h" #include "heromesh.h" +#include "instruc.h" Uint32 generation_number; Object**objects; Uint32 nobjects; Value globals[0x800]; @@ -112,11 +113,11 @@ } } static Value send_message(Uint32 from,Uint32 to,Uint16 msg,Value arg1,Value arg2,Value arg3) { MessageVars saved=msgvars; - Uint16 c=classes[objects[to]->class]; + Uint16 c=objects[to]->class; Uint16 p=get_message_ptr(c,msg); Uint16*code; if(p==0xFFFF) { p=get_message_ptr(0,msg); if(!p) return NVALUE(0); @@ -123,11 +124,11 @@ code=classes[0]->codes; } else { code=classes[c]->codes; } - msgvars={msg,from,arg1,arg2,arg3}; + msgvars=(MessageVars){msg,from,arg1,arg2,arg3}; execute_program(code,p,to); msgvars=saved; }