gameexec.c: fix calculation of a pointer value outside the bounds of an array

and an invalid derived pointer value.

git-svn-id: https://svn.eduke32.com/eduke32@2166 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-12-09 19:10:35 +00:00
parent b7aacd242a
commit eb764b3b75

View file

@ -94,8 +94,10 @@ void VM_OnEvent(register int32_t iEventID, register int32_t iActor, register int
{ {
intptr_t *oinsptr=insptr; intptr_t *oinsptr=insptr;
vmstate_t vm_backup; vmstate_t vm_backup;
vmstate_t tempvm = { iActor, iPlayer, lDist, &actor[iActor].t_data[0], vmstate_t tempvm = { iActor, iPlayer, lDist,
&sprite[iActor], 0 }; iActor >= 0 ? &actor[iActor].t_data[0] : NULL,
iActor >= 0 ? &sprite[iActor] : NULL,
0 };
g_currentEventExec = iEventID; g_currentEventExec = iEventID;
insptr = apScriptGameEvent[iEventID]; insptr = apScriptGameEvent[iEventID];