Fixed a bug in the DECORATE parser that misread a negative DoomEdNum (negative is now interpreted as NO DoomEdNum)

Fixed a bug in the DECORATE parser that caused misreading when a single-line comment was placed after an Actor property value.
This commit is contained in:
codeimp 2010-08-01 20:08:29 +00:00
parent e25fe882f2
commit 525eb2c87e
2 changed files with 7 additions and 1 deletions

View file

@ -142,6 +142,12 @@ namespace CodeImp.DoomBuilder.ZDoom
// break out of this parse loop // break out of this parse loop
break; break;
} }
else if(token == "-")
{
// This could be a negative doomednum (but our parser sees the - as separate token)
// So read whatever is after this token and ignore it (negative doomednum indicates no doomednum)
parser.ReadToken();
}
else else
{ {
// Check if numeric // Check if numeric

View file

@ -153,7 +153,7 @@ namespace CodeImp.DoomBuilder.ZDoom
// Skip entire line // Skip entire line
char c4 = ' '; char c4 = ' ';
while((c4 != '\n') && (datastream.Position < datastream.Length)) { c4 = (char)datareader.ReadByte(); } while((c4 != '\n') && (datastream.Position < datastream.Length)) { c4 = (char)datareader.ReadByte(); }
c = ' '; c = c4;
} }
else else
{ {