Skip to content

Commit

Permalink
fix parsing typedef usage outside of the actual declaration, don't de…
Browse files Browse the repository at this point in the history
…crement loop counter
  • Loading branch information
jpoirier committed Jan 16, 2018
1 parent e96fabf commit e8a2a13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit e8a2a13

Please sign in to comment.