Fixed read of potentially junk values in ZScript parser

The following ill-formed ZScript code might crash targets with sizeof(int) != sizeof(void*) like 64-bit Intel
class test { void func() { if (true) ( return; ) } }
This commit is contained in:
alexey.lysiuk 2018-02-21 15:17:02 +02:00
commit 74357ced0c
2 changed files with 21 additions and 0 deletions

View file

@ -267,6 +267,7 @@ static void ParseSingleFile(FScanner *pSC, const char *filename, int lump, void
while (sc.GetToken())
{
value.Largest = 0;
value.SourceLoc = sc.GetMessageLine();
switch (sc.TokenType)
{