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.
This commit is contained in:
Christoph Oelckers 2018-06-18 08:26:14 +02:00
parent c91d4750f3
commit 243787d19a
1 changed files with 1 additions and 1 deletions

View File

@ -557,7 +557,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);
}