mirror of
https://github.com/cc65/cc65.git
synced 2025-02-26 23:30:03 +00:00
Check for invalid function names before trying to compare the name against
the names of known standard functions. git-svn-id: svn://svn.cc65.org/cc65/trunk@3154 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
725afdee94
commit
0ba074995c
@ -492,7 +492,6 @@ static void FunctionCall (ExprDesc* Expr)
|
||||
{
|
||||
FuncDesc* Func; /* Function descriptor */
|
||||
int IsFuncPtr; /* Flag */
|
||||
int StdFunc; /* Standard function index */
|
||||
unsigned ParamSize; /* Number of parameter bytes */
|
||||
CodeMark Mark;
|
||||
int PtrOffs = 0; /* Offset of function pointer on stack */
|
||||
@ -538,12 +537,13 @@ static void FunctionCall (ExprDesc* Expr)
|
||||
}
|
||||
|
||||
/* Check for known standard functions and inline them */
|
||||
} else if ((StdFunc = FindStdFunc ((const char*) Expr->Name)) >= 0) {
|
||||
|
||||
/* Inline this function */
|
||||
HandleStdFunc (StdFunc, Func, Expr);
|
||||
return;
|
||||
|
||||
} else if (Expr->Name != 0) {
|
||||
int StdFunc = FindStdFunc ((const char*) Expr->Name);
|
||||
if (StdFunc >= 0) {
|
||||
/* Inline this function */
|
||||
HandleStdFunc (StdFunc, Func, Expr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Parse the parameter list */
|
||||
|
Loading…
x
Reference in New Issue
Block a user