Fix CHKCALL
This commit is contained in:
@@ -297,6 +297,17 @@ class VM
|
||||
{
|
||||
return backTraceStack[0..traceI];
|
||||
}
|
||||
bool chkcall(wstring func)
|
||||
{
|
||||
import otya.smilebasic.builtinfunctions;
|
||||
if (func in currentSlot.functions)
|
||||
return true;
|
||||
if (func in BuiltinFunction.builtinFunctions)
|
||||
return true;
|
||||
if (func in commonFunctions)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
enum CodeType
|
||||
{
|
||||
|
||||
@@ -2246,7 +2246,7 @@ class BuiltinFunction
|
||||
static int CHKCALL(PetitComputer p, wstring func)
|
||||
{
|
||||
func = func.toUpper;
|
||||
return (func in p.vm.currentSlot.functions) != null || (func in otya.smilebasic.builtinfunctions.BuiltinFunction.builtinFunctions) != null;
|
||||
return p.vm.chkcall(func);
|
||||
}
|
||||
static int CHKLABEL(PetitComputer p, wstring label)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user