From 243787d19a5c58ebb32a0a020e7ed785eff67096 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 18 Jun 2018 08:26:14 +0200 Subject: [PATCH] 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. --- src/g_mapinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 72fab5071..d73056843 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -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); }