Skip to content

Commit

Permalink
Fixed GP2 accepting an extra trailing "}"
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwonko committed Nov 7, 2015
1 parent e714919 commit ee009e3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions code/game/genericparser2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,16 @@ bool CGPGroup::Parse(const char **dataPtr, CTextPool **textPool)
}
else if (Q_stricmp(token, "}") == 0)
{
// ending brace for this group
return true;
if( mParent )
{
// ending brace for this group
return true;
}
else
{
// top-level group; there was no opening "{" so there should be no closing one, either.
return false;
}
}

strcpy(lastToken, token);
Expand Down

0 comments on commit ee009e3

Please sign in to comment.