fix parsing typedef usage outside of the actual declaration, don't decrement loop counter

This commit is contained in:
Joseph Poirier 2018-01-16 16:12:07 -06:00
parent e96fabfe56
commit e8a2a13595
No known key found for this signature in database
GPG key ID: 65858A2540EBDA40

View file

@ -123,7 +123,7 @@ struct Value *ParseFunctionDefinition(struct ParseState *Parser,
TypeParse(&ParamParser, &ParamType, &ParamIdentifier, NULL);
if (ParamType->Base == TypeVoid) {
/* this isn't a real parameter at all - delete it */
ParamCount--;
//ParamCount--;
FuncValue->Val->FuncDef.NumParams--;
} else {
FuncValue->Val->FuncDef.ParamType[ParamCount] = ParamType;
@ -619,6 +619,7 @@ enum ParseResult ParseStatement(struct ParseState *Parser,
if (VarValue->Typ->Base == Type_Type) {
*Parser = PreState;
ParseDeclaration(Parser, Token);
CheckTrailingSemicolon = false;
break;
}
} else {