1. Set a proper data type when compiling closure.
All checks were successful
The build was successful.

2. Temporarily allow to call a closure/function if its name is stored in a variable of callback or string type. Ultimately, only callback will be allowed.
This commit is contained in:
2018-12-01 12:53:58 +01:00
parent 2572b9321d
commit d87ce3ad1d
2 changed files with 2 additions and 1 deletions

View File

@@ -4831,7 +4831,7 @@ static sxi32 VmByteCodeExec(
SyHashEntry *pEntry;
SyString sName;
/* Extract function name */
if((pTos->iFlags & MEMOBJ_STRING) == 0) {
if((pTos->iFlags & (MEMOBJ_CALL | MEMOBJ_STRING)) == 0) {
if(pTos->iFlags & MEMOBJ_HASHMAP) {
ph7_value sResult;
SySetReset(&aArg);