mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- fixed DEHACKED code pointer validation for real.
The first fix missed a second place where this happened and was incomplete. Anything usable by Dehacked must be VARF_ACTION and VARF_MEMBER in order to work as intended.
This commit is contained in:
parent
20aa7c75de
commit
3675492ab4
1 changed files with 3 additions and 3 deletions
|
@ -2111,7 +2111,7 @@ static int PatchCodePtrs (int dummy)
|
|||
else
|
||||
{
|
||||
TArray<DWORD> &args = sym->Variants[0].ArgFlags;
|
||||
if (args.Size() != 0 && !(args[0] & VARF_Optional))
|
||||
if ((sym->Flags & (VARF_Method | VARF_Action)) != (VARF_Method | VARF_Action) || (args.Size() > 3 && !(args[3] & VARF_Optional)))
|
||||
{
|
||||
Printf("Frame %d: Incompatible code pointer '%s'\n", frame, Line2);
|
||||
sym = NULL;
|
||||
|
@ -2723,9 +2723,9 @@ static bool LoadDehSupp ()
|
|||
else
|
||||
{
|
||||
TArray<DWORD> &args = sym->Variants[0].ArgFlags;
|
||||
if (args.Size() > 3 && !(args[3] & VARF_Optional))
|
||||
if ((sym->Flags & (VARF_Method|VARF_Action)) != (VARF_Method | VARF_Action) || (args.Size() > 3 && !(args[3] & VARF_Optional)))
|
||||
{
|
||||
sc.ScriptMessage("Incompatible code pointer '%s' %d, %d", sc.String, args.Size(), args.Size() > 3? args[3] : 0);
|
||||
sc.ScriptMessage("Incompatible code pointer '%s'", sc.String);
|
||||
}
|
||||
}
|
||||
Actions.Push(sym);
|
||||
|
|
Loading…
Reference in a new issue