From 1118acae4c8d7c7497382eefa438688ec73845af Mon Sep 17 00:00:00 2001 From: skyjake Date: Mon, 27 Aug 2012 10:35:09 +0300 Subject: [PATCH] DED: Added special "no flags" value (0) for Flags 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 = ; --- doomsday/engine/portable/src/def_read.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doomsday/engine/portable/src/def_read.c b/doomsday/engine/portable/src/def_read.c index 60249dab2c..2ef76dc2f7 100644 --- a/doomsday/engine/portable/src/def_read.c +++ b/doomsday/engine/portable/src/def_read.c @@ -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("\"")) {