mirror of
https://github.com/cc65/cc65.git
synced 2024-06-26 05:29:30 +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 */
|
FuncDesc* Func; /* Function descriptor */
|
||||||
int IsFuncPtr; /* Flag */
|
int IsFuncPtr; /* Flag */
|
||||||
int StdFunc; /* Standard function index */
|
|
||||||
unsigned ParamSize; /* Number of parameter bytes */
|
unsigned ParamSize; /* Number of parameter bytes */
|
||||||
CodeMark Mark;
|
CodeMark Mark;
|
||||||
int PtrOffs = 0; /* Offset of function pointer on stack */
|
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 */
|
/* Check for known standard functions and inline them */
|
||||||
} else if ((StdFunc = FindStdFunc ((const char*) Expr->Name)) >= 0) {
|
} else if (Expr->Name != 0) {
|
||||||
|
int StdFunc = FindStdFunc ((const char*) Expr->Name);
|
||||||
/* Inline this function */
|
if (StdFunc >= 0) {
|
||||||
HandleStdFunc (StdFunc, Func, Expr);
|
/* Inline this function */
|
||||||
return;
|
HandleStdFunc (StdFunc, Func, Expr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse the parameter list */
|
/* Parse the parameter list */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user