Remove allowproccall code, dedent a block.

This commit is contained in:
David Anderson 2014-08-19 22:29:13 -07:00
parent 385d3708a3
commit 8dc4fcc728

View File

@ -2281,17 +2281,18 @@ restart:
} /* if */ } /* if */
if (sym!=NULL && lval1->ident==iFUNCTN) { if (sym!=NULL && lval1->ident==iFUNCTN) {
assert(sym->ident==iFUNCTN); assert(sym->ident==iFUNCTN);
if (sc_allowproccall) {
// Note: this is unreachable in SourceMod, we don't support paren-less calls. if (sym->usage & uNATIVE) {
callfunction(sym,NULL,lval1,FALSE); error(76);
} else if ((sym->usage & uNATIVE) != uNATIVE) { return FALSE;
}
symbol *oldsym=sym; symbol *oldsym=sym;
int n=-1,iter=0; int n=-1,iter=0;
int usage = ((sym->usage & uPUBLIC) == uPUBLIC) ? uPUBLIC : 0; int usage = ((sym->usage & uPUBLIC) == uPUBLIC) ? uPUBLIC : 0;
cell code_addr=0; cell code_addr=0;
for (sym=glbtab.next; sym!=NULL; sym=sym->next) { for (sym=glbtab.next; sym!=NULL; sym=sym->next) {
if (sym->ident==iFUNCTN && sym->vclass == sGLOBAL && (!usage || (sym->usage & usage))) if (sym->ident==iFUNCTN && sym->vclass == sGLOBAL && (!usage || (sym->usage & usage))) {
{
if (strcmp(sym->name, lval1->sym->name)==0) { if (strcmp(sym->name, lval1->sym->name)==0) {
n = iter; n = iter;
code_addr = sym->codeaddr; code_addr = sym->codeaddr;
@ -2318,10 +2319,6 @@ restart:
sym->usage |= uREAD; sym->usage |= uREAD;
} else { } else {
error(76); /* invalid function call, or syntax error */ error(76); /* invalid function call, or syntax error */
} /* if */
return FALSE;
} else {
error(76); /* invalid function call, or syntax error */
} }
} /* if */ } /* if */
return lvalue; return lvalue;