mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Merge pull request #387 from alexey-lysiuk/fix_unknown_pcode_crash
Fixed potential crash in ACS engine
This commit is contained in:
commit
029fa1e691
1 changed files with 2 additions and 0 deletions
|
@ -6032,6 +6032,7 @@ int DLevelScript::RunScript ()
|
|||
int sp = 0;
|
||||
int *pc = this->pc;
|
||||
ACSFormat fmt = activeBehavior->GetFormat();
|
||||
FBehavior* const savedActiveBehavior = activeBehavior;
|
||||
unsigned int runaway = 0; // used to prevent infinite loops
|
||||
int pcd;
|
||||
FString work;
|
||||
|
@ -6065,6 +6066,7 @@ int DLevelScript::RunScript ()
|
|||
{
|
||||
default:
|
||||
Printf ("Unknown P-Code %d in %s\n", pcd, ScriptPresentation(script).GetChars());
|
||||
activeBehavior = savedActiveBehavior;
|
||||
// fall through
|
||||
case PCD_TERMINATE:
|
||||
DPrintf ("%s finished\n", ScriptPresentation(script).GetChars());
|
||||
|
|
Loading…
Reference in a new issue