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); }