Skip to content

Commit

Permalink
DED: Added special "no flags" value (0) for Flags
Browse files Browse the repository at this point in the history
The correct syntax to specify that a Flags field has no value is:

Flags = ""; # Old format
Flags = 0;  # New format (added in this commit)

A value token must be included as with any other field, so the following
is illegal:

Flags = ;
  • Loading branch information
skyjake committed Aug 27, 2012
1 parent 5dafd58 commit 1118aca
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doomsday/engine/portable/src/def_read.c
Expand Up @@ -510,6 +510,17 @@ static int ReadFlags(int* dest, const char* prefix)
*dest = 0;

ReadToken();
if(ISTOKEN(";"))
{
SetError("Missing flags value.");
return false;
}
if(ISTOKEN("0"))
{
// No flags defined.
return true;
}

UnreadToken(token);
if(ISTOKEN("\""))
{
Expand Down

0 comments on commit 1118aca

Please sign in to comment.