mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
- there seem to be ACS compilers which let 'delay' pass inside a function. Since this is an unsupported feature which brings the ACS VM into an unstable state it has to be handled with a hard abort to avoid crashes.
This commit is contained in:
parent
e3c36998b6
commit
02f678dccc
1 changed files with 10 additions and 1 deletions
|
@ -9716,7 +9716,16 @@ scriptwait:
|
|||
|
||||
if (runaway != 0 && InModuleScriptNumber >= 0)
|
||||
{
|
||||
activeBehavior->GetScriptPtr(InModuleScriptNumber)->ProfileData.AddRun(runaway);
|
||||
auto scriptptr = activeBehavior->GetScriptPtr(InModuleScriptNumber);
|
||||
if (scriptptr != nullptr)
|
||||
{
|
||||
scriptptr->ProfileData.AddRun(runaway);
|
||||
}
|
||||
else
|
||||
{
|
||||
// It is pointless to continue execution. The script is broken and needs to be aborted.
|
||||
I_Error("Bad script definition encountered. Script %d is reported running but not present.\nThe most likely cause for this message is using 'delay' inside a function which is not supported.\nPlease check the ACS compiler used for compiling the script!", InModuleScriptNumber);
|
||||
}
|
||||
}
|
||||
|
||||
if (state == SCRIPT_DivideBy0)
|
||||
|
|
Loading…
Reference in a new issue