Fixed: End of file detection in MAPINFO parser was not correct

It should check for the special "End" flag instead of trusting that if the last token was a closing brace, all was correct. This can fail if the last token in a multiline string is a brace.

(cherry picked from commit 243787d19a)
This commit is contained in:
Christoph Oelckers 2018-06-18 08:26:14 +02:00 committed by drfrag666
parent a94778ca4d
commit 72136c627c

View file

@ -552,7 +552,7 @@ void FMapInfoParser::SkipToNext()
void FMapInfoParser::CheckEndOfFile(const char *block)
{
if (format_type == FMT_New && !sc.Compare("}"))
if (format_type == FMT_New && (sc.End || !sc.Compare("}")))
{
sc.ScriptError("Unexpected end of file in %s definition", block);
}