Patch from christophe.foucher added.
Issue #168 git-svn-id: http://picoc.googlecode.com/svn/trunk@600 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
b5a600a749
commit
019c4cb42c
2
parse.c
2
parse.c
|
@ -75,7 +75,7 @@ struct Value *ParseFunctionDefinition(struct ParseState *Parser, struct ValueTyp
|
||||||
ParserCopy(&ParamParser, Parser);
|
ParserCopy(&ParamParser, Parser);
|
||||||
ParamCount = ParseCountParams(Parser);
|
ParamCount = ParseCountParams(Parser);
|
||||||
if (ParamCount > PARAMETER_MAX)
|
if (ParamCount > PARAMETER_MAX)
|
||||||
ProgramFail(Parser, "too many parameters");
|
ProgramFail(Parser, "too many parameters (%d allowed)", PARAMETER_MAX);
|
||||||
|
|
||||||
FuncValue = VariableAllocValueAndData(pc, Parser, sizeof(struct FuncDef) + sizeof(struct ValueType *) * ParamCount + sizeof(const char *) * ParamCount, FALSE, NULL, TRUE);
|
FuncValue = VariableAllocValueAndData(pc, Parser, sizeof(struct FuncDef) + sizeof(struct ValueType *) * ParamCount + sizeof(const char *) * ParamCount, FALSE, NULL, TRUE);
|
||||||
FuncValue->Typ = &pc->FunctionType;
|
FuncValue->Typ = &pc->FunctionType;
|
||||||
|
|
Loading…
Reference in a new issue