|
@@ -268,6 +268,7 @@ static void cFunctionInnerBody(int arguments) {
|
|
|
}
|
|
|
|
|
|
static void cFunctionBody(const char* name, int arguments) {
|
|
|
+ int oldLine = line;
|
|
|
cConsumeToken(T_OPEN_CURVED_BRACKET);
|
|
|
cAddOperation(OP_GOTO);
|
|
|
int gotoIndex = cReserveInt();
|
|
@@ -276,7 +277,7 @@ static void cFunctionBody(const char* name, int arguments) {
|
|
|
returnState = 0;
|
|
|
cFunctionInnerBody(arguments);
|
|
|
if(!fmAdd(&functions, name, arguments, address, returnState == 2)) {
|
|
|
- cError("function registered twice on line %d", line);
|
|
|
+ cError("function registered twice on line %d", oldLine);
|
|
|
}
|
|
|
|
|
|
cAddOperation(OP_RETURN);
|